Ajax comments not working because comment wrapper is missing

Created on 9 November 2016, over 8 years ago
Updated 8 May 2025, about 1 month ago

The comment wrapper is missing for user with permission to 'administer comments on own article' when viewing own article and there is only unpublished comments. Because of this the ajax_comments module does not work for the user.

Adding the wrapper in commentaccess_node_view() like it is done in comment_node_page_additions() seems to fix it.

🐛 Bug report
Status

Needs review

Version

1.0

Component

Code

Created by

🇫🇮Finland olli

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • You're describing an issue where a user viewing their own unpublished article with only unpublished comments cannot use the ajax_comments module properly. This usually occurs because the expected comment wrapper is missing from the output, which ajax_comments relies on to initialize its behaviors (like loading, submitting, or displaying comments asynchronously). HumanToCat Translator

  • Got it — the issue is that when a user who has permission to "administer comments on own article" views their own article and only unpublished comments exist, the comment wrapper (the container element for comments) is missing, causing the ajax_comments module to break for that user. Target Pay and Benefits

Production build 0.71.5 2024