Closed (outdated)
Project:
Drupal core
Version:
6.x-dev
Component:
comment.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
26 Oct 2008 at 18:25 UTC
Updated:
2 Mar 2016 at 22:18 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
sebdah commentedI have created a patch that works as suggested in the ticket.
Comment #2
bradweikel commentedworks as described
Comment #3
gábor hojtsyThe thread ordering is also based on cids so looks like your import script should ensure that it keeps the cid order right as far as I can tell. Would be good to look into this a little bit. I tried to look up why are we exactly using cid here, since we use timestamp elsewhere in the module, but did not manage to find that out. Any other opinions on that?
Comment #4
szantog commentedI'played a lot with comment's states with this patch, I can't make any other error with this patch.
This order by cid make lot of errors.
One of the problem is, there are a lot of module, that makes, changes comments different ways. And the cid is constant, but the timestamp not.
An example: the nodecomments can convert comments to node, and vica versa. Convert nodecomments to comment can break the complete comment structure without this patch.
I tried to make some error with this patch more than one hour, and I couldn't. I've installed the latest drupal dev, make 4 content type: Threaded newest, Threaded oldest, Flat newest, Flat oldest. I made tons of comment, with reply, without reply, I modified the post dates after posting a comment.
The threaded views doesn't change, the flat views always works as well.
Comment #5
szantog commentedset to rtbc
Comment #7
szantog commentedOk, attached the new patch..
Comment #8
carteriii commentedI found this thread when searching for a solution to the same problem, that ordering by c.cid doesn't order properly when the comment timestamps have been updated.
I looked into using hook_db_rewrite_sql to modify the behavior, but it's not possible to modify the "order by" clause using hook_db_rewrite_sql.
One other user posted a significant workaround that seems to be far more dangerous than simply fixing comment_render as described here. For the benefit of others, here is the other thread: http://drupal.org/node/554752
Can we get this into core such that it doesn't require a patch in the future?
Comment #9
sivaji_ganesh_jojodae commented+1 for this patch.
Also d8 seems to rely on cid instead of timestamp see comment_get_thread().