Steps required to reproduce the bug
1. Create a forum topic authored anonymously.
2. Make one or more comment in response to the topic created but be sure the last comment is made by a registered user.

Result expected
The topic list should show the topic author (anonymous) without any link.

Result got
The topic list show the topic author (anonymous) with a link pointing to the user profile of the last comment author.

Notes
Same result with Drupal 7.2

Comments

drikc’s picture

Version: 8.x-dev » 7.0
Status: Needs review » Active
StatusFileSize
new811 bytes

I've found that in forum.module line 1126 in template_preprocess_forum_topic_list(&$variables) function there is the following instruction:

  ...
  $topic->uid = $topic->last_comment_uid ? $topic->last_comment_uid : $topic->uid; // line 1126
  $variables['topics'][$id]->created = theme('forum_submitted', array('topic' => $topic));
  $variables['topics'][$id]->last_reply = theme('forum_submitted', array('topic' => isset($topic->last_reply) ? $topic->last_reply : NULL));
  ...

This line is what trigger this issue and removing it result in what is expected in regard to this issue so the attached patch just comment it.

The question now is: for what this line is use for and what are the consequences of commenting it?

drikc’s picture

Status: Active » Needs review
drikc’s picture

Version: 7.0 » 8.x-dev
drikc’s picture

drikc’s picture

Version: 7.0 » 8.x-dev
Status: Active » Needs review
StatusFileSize
new721 bytes

I didn't find any consequence issues when removing the line 1126.

nneka’s picture

Status: Needs review » Closed (duplicate)