Closed (fixed)
Project:
Drupal core
Version:
x.y.z
Component:
comment.module
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
7 Sep 2006 at 22:57 UTC
Updated:
1 Oct 2006 at 19:15 UTC
Jump to comment: Most recent file
Comments
Comment #1
AjK commentedcomment to get me subscribed
Comment #2
nickl commentedBusy investigating...
Lots of fapi 2 clean up also required in comment.module
Comment #3
edmund.kwok commentedFound the problem. The comments admin page is a callback to drupal_get_form() which takes 'comment_admin_overview' as an argument. In comment_admin_overview, when the operation is delete, comment_multiple_delete_confirm() returns a form array. The thing here is, the form is not rendered as the array is not passed to drupal_get_form().
Patch changes things by:
1. Setting the menu callback to comment_admin
2. Comment_admin will determine which form to render, comment_multiple_delete_confirm or comment_admin_overview
3. Comment_admin_overview is now a function that only builds the comment listing array
Please review.
Comment #4
edmund.kwok commentedAh, confirm delete form was working in the previous patch but deleting still never took place. $edit in comment_multiple_delete_confirm_submit was not defined, this patch changed it to $form_values.
Btw, to get the patch working properly, you need to rebuild your menu.
Comment #5
AjK commentedPatch applied clean.
Hmm, this just gives me
and still no multi-comment delete. I tried something similar along these lines (as used in user.module for multi-user delete which does work) and still it refused to budge.
Comment #6
edmund.kwok commentedDid you try resetting your menu? Just browse to the menus admin page.
Comment #7
AjK commentedStunning, lightning storm just took out all the power for a minute (so much for the UPS, lasted less than 45secs, need a bigger one).
When I came back to this (obviously after all my machines rebooted) bingo, works a treat! I guess Mother Nature cleared the cache for me (and scared the life out of my 3yrs old who didn't like the sudden dark).
I'd say RTBC but I'm sure Flk will come along and double check it. Thx for the patch
regards,
--AjK
Comment #8
flk commentedok, patch does what it says....
but patch was not rolled from drupal root (patches should always be rolled from drupal root :D ).
I dont like the way the confirm delete page is.. I think confirm pages should be on their own place and nothing to clutter/confuse the user. more like 'comment/delete/idhere' page.
eww just saw an ugly error when going to 'comment/delete/'. (shuffles off to report it)
Comment #9
edmund.kwok commentedPatch was rerolled from Drupal root.
Using a 'comment/delete/cidhere' won't work as we are deleting multi comments. But I agree that using a specific menu callback like 'comment/delete' would be less confusing to the users and we can avoid using $_POST. That is beyond the scope of this patch IMO, and should be left for a separate task/feature report. Maybe then we can also revamp the deleting multiple users workflow to follow suit?
This patch follows the original workflow of deleting comments as close as possible to avoid changing a lot of codes. I'd say it fixes the bug as reported.
Comment #10
AjK commentedI'd tend to agree that this patch resolves this issue.
For the record, applies clean and does what it says on the tin, fixes "broken multi-comment delete".
regards,
--AjK
Comment #11
dries commentedCommitted to CVS HEAD. Thanks.
Comment #12
(not verified) commented