1. Create some nodes
2. Go to admin -> content
3. Select node(s)
4. Choose "Delete the selected posts" and click "Update"
5. The posts are not deleted.

Version is CVS HEAD as of October 24 2005

-Steve

CommentFileSizeAuthor
#3 node.module_18.patch5.16 KBdrewish

Comments

shouchen’s picture

jeremy’s picture

drewish’s picture

Status: Active » Needs review
StatusFileSize
new5.16 KB

I think (though I'm not sure) that part of the problem was the dispatch done by node_admin(). Either way it was an un-needed layer of redirection.

The main problem was that node_admin_nodes() was mixing up the two forms just to get the values set in the $form_values global. All the needed data was in the $_POST so I now the delete form is independent of the node_admin_nodes() form. I renamed node_multiple_delete_form() to node_multiple_delete_confirm() to match the name of the the single node delete function (node_delete_confirm()).

Give the attached patch a try. There may be a cleaner way to do it but, I've done a bit of testing on it and this seems to work pretty well.

drumm’s picture

Applied and mass deleting worked. Good code improvement too.
+1

Steven’s picture

Status: Needs review » Fixed

Patch works, +1 on the cleanup too.

The only part I don't like is where you added the code for title-less nodes. As far as I know, all nodes require a title. There are plenty of UI parts which would otherwise be empty or broken. Plus, you used a non-localizable string, with non-semantic italic tags (we would use em instead).

Committed to HEAD minus that 'untitled' part.

drewish’s picture

Ahh, sorry about that title-less nodes bit. I'd ment to filter that out before rolling the patch. The whole reason I found the bug (and needed to fix it) was to clean up a bunch of title-less nodes left over from a broken module. I'd add the titles as part of the debugging process.

Anonymous’s picture

Status: Fixed » Closed (fixed)