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

CommentFileSizeAuthor
#1 comment-add_pager_id-2472611-1.patch1.42 KBscottalan
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

scottalan’s picture

Here's the patch.

scottalan’s picture

Here's a link to a post with a patch that will show the other side.

https://www.drupal.org/node/2433923

sylus’s picture

Status: Active » Needs review