New comments link is not being displayed on activity pages

Created on 22 November 2015, over 8 years ago
Updated 22 April 2024, 2 months ago

"Recent content", the page coming from tracker module doesn't work properly.

The "new comments" link is not displayed.

Steps to reproduce:

1. Install brand new site.
2. Log in with the admin user.
3. Enable tracker module.
4. Create another user, and make it admin (just for permissions sake).
5. Open incognito or a different browser and log in with the second user).
6. Create an article and forum post with the second user.
7. Comment on the article and forum post with the second user.
8. Go to /activity on the first user.

You should see "1 new" on the comments tab, but it doesn't show.

The request to: http://drupal86.dev.localhost/comments/render_new_comments_node_links

Returns:

TypeError: Argument 1 passed to Drupal\comment\CommentManager::getCountNewComments() must implement interface Drupal\Core\Entity\EntityInterface, null given, called in /Users/ariel/Sites/drupal/drupal86.git/core/modules/comment/src/Controller/CommentController.php on line 333 in Drupal\comment\CommentManager->getCountNewComments() (line 180 of /Users/ariel/Sites/drupal/drupal86.git/core/modules/comment/src/CommentManager.php).

This is actually because the POST node_ids[] are null, and the reason for that is #2915993: Adjust render_new_comments_node_links to fix issues β†’ , which is the traversing of the table column HTML tags could fail on some browsers/OSs/themes. However, even by fixing that, you also get:

Error: Call to a member function getSetting() on null in Drupal\comment\CommentStorage->getNewCommentPageNumber() (line 135 of /Users/ariel/Sites/drupal/drupal86.git/core/modules/comment/src/CommentStorage.php).

And the reason for that is also both mentioned on the comments here and on #2915993: Adjust render_new_comments_node_links to fix issues β†’ and is because you are not sending anywhere the comment field name and that's needed for this to work.

No interdiff really as it's a whole different approach.

πŸ› Bug report
Status

Active

Version

1.0

Component
TrackerΒ  β†’

Last updated 26 days ago

No maintainer
Created by

πŸ‡³πŸ‡ΏNew Zealand Jeff Burnz

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

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.

Production build 0.69.0 2024