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

Dave Reid - November 1, 2008 - 22:42
Version:6.6» 6.x-dev
Component:theme system» comment.module

Does this problem happen for registered or anonymous users?

#2

Dave Reid - November 1, 2008 - 23:32

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:

<?php
function comment_controls($mode = COMMENT_MODE_THREADED_EXPANDED, $order = COMMENT_ORDER_NEWEST_FIRST, $comments_per_page = 50) {
?>

Needs to be:

<?php
function comment_controls(&$form_state, $mode = COMMENT_MODE_THREADED_EXPANDED, $order = COMMENT_ORDER_NEWEST_FIRST, $comments_per_page = 50) {
?>

Patch following shortly.

#3

Dave Reid - November 1, 2008 - 23:37
Assigned to:Anonymous» Dave Reid
Status:active» needs review

Simple patch. This feature was removed in 7.x, so it's a 6.x-only patch.

AttachmentSizeStatusTest resultOperations
328977-comment-controls-D6.patch890 bytesIgnoredNoneNone

#4

hgmichna - November 2, 2008 - 09:43

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

Dave Reid - December 10, 2008 - 21:51

hgmichna, if this works for you, do you mind marking this as "Reviewed as Tested by Community"?

#6

hgmichna - December 10, 2008 - 22:08
Status:needs review» reviewed & tested by the community

Done, and thanks again for the quick patch! I hope this will automatically go into the next 6.x release.

#7

andypost - December 10, 2008 - 22:17

Confirm that fixes so long broken comment controls

#8

hgmichna - December 11, 2008 - 21:21
Version:6.x-dev» 6.8
Status:reviewed & tested by the community» active

And the defect is back in Drupal 6.8. What happened?

#9

Dave Reid - December 11, 2008 - 21:25
Version:6.8» 6.x-dev
Status:active» reviewed & tested by the community

Because it has not been committed yet. Please don't change the status.

#10

hgmichna - December 11, 2008 - 23:14

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

Gábor Hojtsy - January 6, 2009 - 17:35
Status:reviewed & tested by the community» fixed

Looks straightforward. Thanks, committed.

#12

System Message - January 20, 2009 - 17:40
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.