node_comments and core comment module comment_get_thread queries have become out of sync.

Please compare the queries in:

comment_get_thread and ctools_comment_render

The attached patch amends ctools_comment_render to use the same query approach as core.

It basically adds a tag to the query and also the node metadata.

This allows other contrib modules, such as sort_comments to interact with the comment query and add an ASC/DESC sort

Please commit if possible:

DT

Comments

merlinofchaos’s picture

Status: Needs review » Needs work

Patch no longer applies, I think thanks to a patch by Dave Reid I committed just a few minutes ago. See #1235866: ctools_comment_render() should re-use comment_get_thread()

It may obsolete this change.

davidwhthomas’s picture

Status: Needs work » Closed (fixed)

Thanks for commiting the related patch, which addresses the same issue.
Calling the core api function rather than replicating it ctools makes sense and solves this issue.
Closing with thanks,
DT