The Chameleon theme attempts to use the value of $comment->status in the HTML that it outputs, but this doesn't work correctly. When a comment is being previewed, $comment->status doesn't even exist (leading to a PHP notice), and otherwise it is a boolean which evaluates to "0" or "1", so the end result is HTML that looks like this, which is definitely not the desired behavior:

<div class="comment 1">
...
</div>

In D6, things are a little worse (it attempts to use $status rather than $comment->status, leading to a PHP notice all the time).

The attached patch fixes things by not bothering to use $comment->status at all in the HTML... probably the "correct" way to fix this is to instead copy some of the code from http://api.drupal.org/api/function/template_preprocess_comment/6 into the Chameleon theme (so that it could generate a $status variable in the same way PHPTemplate themes do), but I'm not really sure that kind of code duplication is really worth it in this case. We can probably live with all comments in Chameleon/Marvin being wrapped in a simple <div class="comment"> ... </div> and that's it, since that's effectively what is happening in D6 now anyway.

CommentFileSizeAuthor
chameleon_comment_status.patch942 bytesDavid_Rothstein

Comments

dries’s picture

Status: Needs review » Fixed

Committed to CVS HEAD. Thanks.

Status: Fixed » Closed (fixed)

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