The attached patch changes this line in blueprint_preprocess_comment from:

if (theme_get_setting('toggle_comment_user_picture') && empty($vars['comment']->picture)) {

to this:

if (theme_get_setting('toggle_comment_user_picture') && empty($vars['picture'])) {

as the former always evaluates to true, because the picture is in the $vars array, not part of the comment itself.

CommentFileSizeAuthor
blueprint.comment.patch650 bytesjhedstrom
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

designerbrent’s picture

Status: Needs review » Closed (won't fix)

I'm a little confused by this patch. The actual code

  // if user has no picture, add in a filler
  if (theme_get_setting('toggle_comment_user_picture') && empty($vars['comment']->picture)) {
    $vars['picture'] = '<div class="no-picture">&nbsp;</div>';
  }

is checking to see if there is something INSIDE of the variable "$vars['comment']->picture" which does not always return true.

At this point, I'm marking this as "won't fix" as it doesn't appear to be a problem. However if you can show me where the problem lies, I'll be happy to address it.

jhedstrom’s picture

Status: Closed (won't fix) » Needs review

Hey designerbrent,

The issue is that, in my tests, $vars['comment']->picture is never actually set, so $vars['comment']->picture always evaluates to false. Instead, the code should check for $vars['picture'] being empty.

http://api.drupal.org/api/function/template_preprocess_comment/6

designerbrent’s picture

Hey jhedstrom. Thanks for the quick reply.

In my test site (Drupal 6.14) $vars['comment']->picture is set if the user has a picture. If they don't the variable is empty. On the other hand, $vars['picture'] is always set to

prior to this. So it would make it harder to test.