Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The Problem:
https://www.drupal.org/node/2433923
This basically says, If adding comments via a ctools plugin the pager is broken. This is the case but goes a bit deeper. If you try to add comments to a node outside of the default and you call comment_get_thread()
There isn't a way to allow passing in a pager id so you can have more than one pager without the ids screwing up.
The Proposed Solution:
Adding an argument to comment_get_thread()
to allow passing in a pager id:
// Allows setting a specific pager id.
if (isset($pager_id)) {
$query->element($pager_id);
}
This is extremely helpful if adding multiple comments with pager to a node via: ctools plugins or any other way.
Thanks,
--Scott
Comment | File | Size | Author |
---|---|---|---|
#1 | comment-add_pager_id-2472611-1.patch | 1.42 KB | scottalan |
Comments
Comment #1
scottalan CreditAttribution: scottalan commentedHere's the patch.
Comment #2
scottalan CreditAttribution: scottalan commentedHere's a link to a post with a patch that will show the other side.
https://www.drupal.org/node/2433923
Comment #3
sylus CreditAttribution: sylus commented