No option to delete content by type
z.stolar - January 21, 2008 - 07:17
| Project: | Delete all |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | patch (to be ported) |
Description
The project's page declares:
When deleting nodes, you can select to delete all nodes, or just delete nodes by type.
However, there is no option to delete content by type. Deleting nodes deletes them all...
(marked as documentation bug)

#1
The attached patch adds the functionality of selectively deleting nodes by type.
Currently you need to go to admin/content/delete_content/something_which_is_not_a_content_type to get a list of all node types, with counters, and links to delete each content type's nodes.
This patch should be improved to:
- change links with checkboxes, so you can delete few content types' nodes at the same time
- allow a direct link to the list, without that ugly url mentioned above.
Accessing the normal path (admin/content/delete_content) will propose to delete ALL content.
#2
This patch has minor bug.. When deleting content of speficic content type.. the {sequences} for node_nid should NOT be reset to 1
#3
You're right, there should be one more check.
I also added a different message in case of a type deletion.
#4
Patch no longer applies.
Please reroll.
#5
Ok, so it is not possible to delete content by type? I just installed this module but hte only option is delete all content.
Cheers,
G
#6
As far as I know - if you use the patch at #3, you'll be able to delete by type.
However, Khalid noted it isn't valid - maybe it was patched against the wrong version.
Can you re-patch?
#7
thanks, this patch #3 works for me!
#8
The patch does not apply.
Can someone reroll against what is in CVS for D5?
$ patch -p0 --dry-run < delete_all.module_0.patchpatching file delete_all.module
Hunk #1 FAILED at 24.
Hunk #2 FAILED at 57.
Hunk #3 FAILED at 72.
3 out of 3 hunks FAILED -- saving rejects to file delete_all.module.rej
We also need a port to D6.
#9
Going roughly over the code, it looks as if this feature is already implemented...
If it does, this thread can be closed.
#10
Hi,
I think I'm having same problem.
I applied patch in #3 and tried to go to "admin/content/delete_content/something_which_is_not_a_content_type" and got a page not found error.
Ideas?
#11
Hi All,
I needed to delete all nodes by type and also delete taxonomy terms by vocabulary (vid). Rather than create a new module I added the functionality to this module.
There is now a new menu item under: Administer -> Site Configuration -> Bulk Delete
It has a form for deleting taxonomy terms by vocabulary and deleting nodes by type.
It probably could use some more testing but so far it got the job done. I plan on adding DRUSH functionality next. Please message me any bugs and I'm happy to fix them.
#12
Thank you, I included your patch to the 5.x-1.x-dev version.
This needs to be ported to the 6.x version as well.
#13
I'll submit a D6 patch in the coming days. Thanks for checking out the D5 patch!
#14
Hi all,
More functionality! Added to the "Bulk Delete" form:
Delete nodes by taxonomy term.
Nice module, very useful!
Best,
j
#15
@jruberto
Thank you for the patch, but this issue is left as "to be ported" for the delete by content type patch. Adding patches for separate features is confusing.
Please open a new issue for the new patch, and try to create patches for 5.x as well as 6.x.
Thanks again.
#16
will do. sorry to break protocol, was pretty cross-eyed by the time I rolled this patch.. have to fix some code formatting in the patch too... coming soon. thanks!