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
| Comment | File | Size | Author |
|---|---|---|---|
| #15 | node_comment_statistics-55246-15.patch | 1.07 KB | zambrey |
| #10 | node_comment_statistics-55246-D7.patch | 1.06 KB | jonathan webb |
Comments
Comment #1
Julien PHAM commentedMoreover 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
Comment #2
killes@www.drop.org commentedI 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
Comment #3
Julien PHAM commentedIndeed 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.
Comment #4
merlinofchaos commentedThis 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.
Comment #5
Julien PHAM commentedI'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?
Comment #6
merlinofchaos commentedI 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.
Comment #7
Julien PHAM commentedOk, if I create then delete a comment, the author changes is updated...
Comment #8
magico commentedIs this still a bug?
Comment #9
liam mcdermott commentedJust 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.
Comment #10
jonathan webb commentedI 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
Comment #12
jonathan webb commented#10: node_comment_statistics-55246-D7.patch queued for re-testing.
Comment #13
moshe weitzman commentedIt 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.
Comment #14
jonathan webb commentedWe're not lying, we're just counting from 0 instead of 1; the node itself being the "0th" comment.
Comment #15
zambrey commentedMassive bump :)
Here's a rerolled version of patch from #10.