Comment viewing options do not reflect current settings
hgmichna - November 1, 2008 - 22:14
| Project: | Drupal |
| Version: | 6.x-dev |
| Component: | comment.module |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Dave Reid |
| Status: | closed |
Description
I'm not absolutely sure whether this is merely a theme problem (running a modified Foundation), but it may well be a problem in Drupal itself.
The three on-page comment viewing options do not reflect the current settings. The three listboxes all always show their first choices, even though other choices are selected and active. This confuses the users.
It also requires that, for each change of a single option, the user has to remember all three options and set them again every time he wants to change only one of them.
This worked correctly in Drupal 5 and is now broken in Drupal 6.
Hans-Georg

#1
Does this problem happen for registered or anonymous users?
#2
Confirmed the bug in 6.x as an anonymous and logged in user. comment_form doesn't have a &$form_state parameter, and the parameters get messed up when calling drupal_get_form:
Current code in comment_render:
<?php$output .= drupal_get_form('comment_controls', $mode, $order, $comments_per_page);
?>
Current function comment_controls:
<?phpfunction comment_controls($mode = COMMENT_MODE_THREADED_EXPANDED, $order = COMMENT_ORDER_NEWEST_FIRST, $comments_per_page = 50) {
?>
Needs to be:
<?phpfunction comment_controls(&$form_state, $mode = COMMENT_MODE_THREADED_EXPANDED, $order = COMMENT_ORDER_NEWEST_FIRST, $comments_per_page = 50) {
?>
Patch following shortly.
#3
Simple patch. This feature was removed in 7.x, so it's a 6.x-only patch.
#4
Thanks, great! That was quick!
The patch worked on the spot in Drupal 6.6. I haven't actually reviewed the code and have left the issue status alone, but at least you have one independent success report now.
If you find the time, could you mention briefly why the feature was removed in Drupal 7 and whether it was replaced with something else? Superficially the feature looked useful to me, although I always preferred a particular view for a particular web site.
Hans-Georg
#5
hgmichna, if this works for you, do you mind marking this as "Reviewed as Tested by Community"?
#6
Done, and thanks again for the quick patch! I hope this will automatically go into the next 6.x release.
#7
Confirm that fixes so long broken comment controls
#8
And the defect is back in Drupal 6.8. What happened?
#9
Because it has not been committed yet. Please don't change the status.
#10
Oh, sorry. I didn't understand the procedures or didn't think enough about them. Now I guess the patch wasn't committed because it hadn't been set to "reviewed and tested" in time. Hope it can get into a later Drupal version soon.
Moreover, I just found that the same patch still works on Drupal 6.8, because the file to be patched, comment.module, is unchanged since version 6.6.
#11
Looks straightforward. Thanks, committed.
#12
Automatically closed -- issue fixed for two weeks with no activity.