I have created a content node with comment fields. I have then changed the Structure>Pages>System>node_view to use a Panel page to display the content node's fields, instead of the default content node display.

Here's the problem. I have configured the comment access permissions to allow content owners to approve a comment on content nodes they created.
If I am logged in as the main Administrator I can see the comment that needs to be approved displayed on the content panel page.
If I log out and then log back in as the user that created the content then I can't see the comment that needs to be approved in the Panel page. However, if I disable the system panel page and go back to the default content node display then the comment that needs to be approved shows up.

If I enable the Core Comment permission "Administer comments and comment settings" for the role assigned to the user then the comment that needs to be approved DOES show up in the panel page. Unfortunately, this allows other users with the same Role assignment to see the comment before the comment owner approves it.

The problem seems to be with the Comment_Access permission - Administer comments on own content and how it interacts with a panel page.

To sum up. Logged in as user that created content, I can't see a comment that needs to be approved if the content is being displayed in a panel page and not the default content node page.

Comments

echodos’s picture

Status: Active » Closed (works as designed)
echodos’s picture

Status: Closed (works as designed) » Active
rschwab’s picture

I'll have time this week to look at this issue. What version of panels and ctools are you using?

jastraat’s picture

I am using this module with the latest official versions of panels and ctools with no problems. The only somewhat strange thing is that the unapproved comments do not appear under comments at the bottom of the page but instead at the top of the panel page. (Not ideal, but something I can deal with.)

jastraat’s picture

I was looking at commentaccess_node_view(). Is there a reason that you created $node->content['commentaccess'] instead of appending the unapproved comments to the $node->content['comments'] array? It seems that this would fix the display problem. Right now, two "Comment" sections are being created with the same ids which is less than ideal -

jastraat’s picture

To address the problem mentioned above, I changed line 219 in commentaccess.module from
$node->content['commentaccess'] = $additions;
to

  foreach ($additions['comments'] as $key => $comment) {
    if (is_numeric($key) && is_array($comment)) {
      $node->content['comments']['comments'][$key] = $comment;
    }
  }

Lines 213-218 may no longer be necessary with this change as well.

ruess’s picture

This problem doesn't seem to have been resolved. I am still experiencing the same exact issue that echodos experienced, and the code near the end of the thread did not solve it for me.

Any thoughts about how to get approval links for comments in a comment node panel?

Thanks,

ruess

rschwab’s picture

My hope is that this will be solved with #1790580: Unpublished comments are displayed in separate thread; should be displayed in normal context. If you want to help out with this issue, please take a look at getting that issue fixed. Thanks!

rschwab’s picture

Title: problems with panel page » Integrate with Panels module
Category: bug » feature
Priority: Major » Normal
formatC'vt’s picture

Status: Active » Postponed (maintainer needs more info)

try latest dev please