History controller throws 404 error on comment reply page

Created on 25 June 2020, almost 4 years ago
Updated 5 April 2023, about 1 year ago

Problem/Motivation

On the comment reply page, \Drupal\history\Controller\HistoryController::getNodeReadTimestamps throws a 404 error for the /history/get_node_read_timestamps path. It looks like the data-history-node-id attribute isn't present on the comment reply page, while the comment/drupal.comment-new-indicator JS library, which relies on that attribute to pass the node ids to \Drupal\history\Controller\HistoryController, is loaded on the comment reply page (in \Drupal\comment\CommentViewBuilder::buildComponents).

Steps to reproduce

  1. Install Standard profile
  2. Create an article
  3. Create an comment on the article
  4. Click 'Reply' on the created comment

Check the db log for the 404 error.

(tested on a clean install on Simplytest.me)

Proposed resolution

Don't load the comment/drupal.comment-new-indicator JS library on the comment reply page, since I don't think we need a 'new' indicator there?

🐛 Bug report
Status

Needs work

Version

10.1

Component
Comment 

Last updated 2 days ago

Created by

🇨🇦Canada brunodbo Coast Salish Territory

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.

Production build 0.69.0 2024