Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
comment.module
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
16 Jul 2009 at 02:46 UTC
Updated:
3 Jan 2014 at 00:29 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
Toktik commentedSame bug here. Using HEAD.
SQL query in comment_render() is normal. Any other instance for this bug?
Comment #2
marcingy commentedThe issue is being caused in comment_load_multiple. The array is loaded correctly in comment_render, however the order is forgotten when we load the comment collection. This patch introduces a new parameter that can be passed into comment_load_multiple to allow for orderby statements, and removes the original ordering in comment render as it does 'nothing'. Initial patch supplied to fix the issue.
Comment #4
damien tournoud commentedNice catch, but the correct fix is to make sure that comment_load_multiple() respect the order of the cids it receives, the same way that node_load_multiple() does respect the order of the nids it receives.
Comment #5
catchUntested patch which does that. Looks like we don't have tests for the order of threaded comments, hoping it might just be a couple of asserts / strpos in the existing tests.
Comment #7
tylor commentedPatch from #5 applied fine but problem still exists; followed steps from original post.
Comment #8
yched commentedPatch #5 had unrelated hunks. Simple repost, I did not even test, don't credit me.
(ps: lol at
? bottle.patch)Comment #9
andypostI've tested a patch - comments still posts under last thread.
Screens in my duplicate issue #529374: Reply on comment is broken
Comment #10
marcingy commentedChange the operation on the array as we have 0 key and placement issues in the array
Comment #12
tylor commentedTested #10 and comments were threaded as expected. Patch failed to apply, re-rolled from root.
Comment #13
andypostThis patch (#12) applies cleanly and now comments displays in right way.
+1 to rtbc this after bot happy!
Comment #14
andypostLooks like everything fine and 3 opinions to rtbc
Comment #15
webchickSorry, but we will need some tests for this. Otherwise, we're likely to break it again.
Comment #16
damien tournoud commentedThis was nearly fixed by the entity patch. Only nearly, because a condition was wrong in DrupalDefaultEntityController::load(). We actually need to fix the ordering of the result set even when the cache is not enabled.
Here is a patch + test.
Comment #17
catchVery nice.
Comment #18
webchickAwesome! Thank you very much. Committed to HEAD.