delete-all support for drupal 6.x

spamontvang - August 2, 2008 - 20:27
Project:Delete all
Version:5.x-1.0
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed
Description

hello,

it would be nice if the module becomes available for 6.x as well
(or some alternative)
thanks

#1

kbahey - August 2, 2008 - 23:35

#2

deviantintegral - August 3, 2008 - 21:09

I've attached an initial port for Drupal 6. So far, it seems to be working as expected. There's one issue though; for some reason, '#required' isn't sticking on the confirm checkbox, so you can delete all of your content without confirming.

It looks like Devel can now delete all nodes before generating content. At present, it throws errors if you try to delete content without generating anything, but perhaps this functionality should be rolled into devel at some point.

The patch is against -dev, but there isn't a release set up so I can't change it in the issue. Hopefully though there will soon be a 6 -dev branch available.

Thanks,
--Andrew

AttachmentSize
delete_all_d6.patch 5.6 KB

#3

deviantintegral - August 3, 2008 - 21:13
Status:active» needs review

#4

kbahey - August 4, 2008 - 00:22
Status:needs review» needs work

Thanks for the patch. I committed it, and created a DRUPAL-6--1 branch. I did not create a release node for it pending this critical issue you pointed out.

Hope it gets solved soon.

#5

deviantintegral - August 4, 2008 - 17:18

Looks like we're being hit by a D6 core bug: #179932: Radio/checkboxes set to 'required' are not validated (and a dupe with more info: #179932: Radio/checkboxes set to 'required' are not validated). There's a contrib module to work around the issue called checkbox_validate, but Khalid and I think a confirm form will be better anyways.

--Andrew

#6

kbahey - August 4, 2008 - 17:29

Yes a confirm page is the way to go.

Once someone commits a patch for it, I will commit it and create a 6.x branch.

#7

deviantintegral - August 4, 2008 - 20:23

Here's a patch which both implements a confirm page, and changes the form if no content is available to delete. If devel is enabled, it also provides a link to the generate content page.

It's rather ugly in how you pass form values through a 'confirm' form. I found a handy guide at #281290: How to Confirm a Form Submission. However, I think it's a small price to pay for the improved UI.

I noticed that 'quick delete' doesn't seem to work. If I try to delete all pages, it tries to find a content_type_page table, which doesn't exist. I haven't fixed it yet, and don't know if this is actually an issue with just D6. I wonder how useful the quick delete option is though; on my tiny VPS slice, I could delete 10000 nodes in under 2 minutes.

--Andrew

AttachmentSize
delete_all_d6_confirm.patch 6.75 KB

#8

kbahey - August 4, 2008 - 23:35
Status:needs work» fixed

Thanks.

A dev release should appear here in 24 hours.

http://drupal.org/node/291175

Please open a new issue about the quick delete not working against 6.x-1.x-dev.

#9

Anonymous (not verified) - August 18, 2008 - 23:44
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

#10

higherform - March 14, 2009 - 15:41
Status:closed» reviewed & tested by the community

After applying patches #2 and #7 (some chunks manually), I can confirm that the patch does produce a module that works as expected in 6.x. I recommend the release of a 6.x- dev version based on patch #7.

#11

kbahey - April 8, 2009 - 16:09
Status:reviewed & tested by the community» closed

There is a 6.x release, it is now visible on the project page.

 
 

Drupal is a registered trademark of Dries Buytaert.