Hi,
So, I have written a forum topic as my first user, "webmaster" one. So on the front page in last message infos it was displayed: last message by "webmaster" on ...

Then I change my mind, I edit my forum topic, and put as a writer another user. But the forum front page is not changed and still displays "last message : webmaster".

Thanks

Comments

Julien PHAM’s picture

Priority: Normal » Critical

Moreover if I create a new article in the same forum, the "last message" window is not updated accordingly, it is still the first message which is displayed. And this is critical.

Thanks

killes@www.drop.org’s picture

I don't think it is critical, but I think it is fixed by a patch I committed a few minutes ago:

http://drupal.org/node/54098

Julien PHAM’s picture

Priority: Critical » Normal

Indeed for the second part, I just saw it.
But there is still the issue where when you change the author of a forum node, the author is not changed in the "last message" column. But I agree this is not critical.

merlinofchaos’s picture

This would require actually changing the results in the node_comment_statistics page.

I suggest the following workaround: If you change the author of a forum post, try then posting a comment and then deleting the comment. That should force the table to be properly rewritten. If that workaround works, then the bug should be reduce to minor.

Julien PHAM’s picture

I'll try, but I don't understand, I cannot post any comment to a forum topic even if the topic is displayed with "comment enabled reading/writing". I have not the link "new comment"...
It works with other nodes, but not with forums... perhaps I missed something somewhere?

merlinofchaos’s picture

I think you can change what node types can have comments at admin/node/configure.

You can also directly edit that node and check to see if comments are enabled/disabled for that node.

Julien PHAM’s picture

Priority: Normal » Minor

Ok, if I create then delete a comment, the author changes is updated...

magico’s picture

Is this still a bug?

liam mcdermott’s picture

Version: x.y.z » 7.x-dev

Just tested with Drupal 6 RC3 and this is still a bug. As it won't get into six am bumping version up to seven. Worth noting: if #148849: Refactor {comment_entity_statistics} into performant Field happens we'll get this bug fixed for free.

jonathan webb’s picture

Title: Changing user does not change forum front page » Node updates are not reflected in node_comment_statistics correctly
Component: forum.module » comment.module
Status: Active » Needs review
StatusFileSize
new1.06 KB

I confirmed that this was still an issue in D7. I created forum node, viewed /forum, changed node's author, and confirmed that the change was not reflected at /forum.

Issue #148849: Refactor {comment_entity_statistics} into performant Field, referenced above, is scheduled for D8 now.

Here's a patch which implements hook_node_update() for the comment module to complement what already happens with hook_node_insert(). This function will update the node's author and/or node creation date in the {node_comment_statistics} table in the event that the node changes before comments have been added to it. This will cause dependent views (such as the forum page) to show the correct information.

Related Issues:
#273157: Comment last updated is wrong if authoring date is changed

Status: Needs review » Needs work

The last submitted patch, node_comment_statistics-55246-D7.patch, failed testing.

jonathan webb’s picture

Status: Needs work » Needs review
moshe weitzman’s picture

It is really weird that last_comment_timestamp has any value when there are no comments. and its annoying to keep it up to date. just adds another write query to update which is important in data migration scenarios.

so, is there no way to leave stuff blank when comment_count = 0. as is, we are lying.

jonathan webb’s picture

We're not lying, we're just counting from 0 instead of 1; the node itself being the "0th" comment.

zambrey’s picture

StatusFileSize
new1.07 KB

Massive bump :)
Here's a rerolled version of patch from #10.

Status: Needs review » Needs work

The last submitted patch, node_comment_statistics-55246-15.patch, failed testing.

Status: Needs work » Closed (outdated)

Automatically closed because Drupal 7 security and bugfix support has ended as of 5 January 2025. If the issue verifiably applies to later versions, please reopen with details and update the version.