Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 295966

Do not attach history for non-node entities in CommentViewBuilder::buildComponents()

$
0
0

Problem/Motivation

\Drupal\comment\CommentViewBuilder::buildComponents() within loop checking $this->moduleHandler->moduleExists('history') && $this->currentUser->isAuthenticated() for every comment and attach indication of unread comments.
But history module works only for node entities which is a bug when comments attached to other entities.

Also it creates placeholder for each comment to attach similar settings for JS which is needed only once (so could be optimized)

Proposed resolution

- Add condition to attach history libraries to node entities only
- Move common condition check out of loop
-

Remaining tasks

- create a patch
- review
- commit

User interface changes

no

API changes

no

Data model changes

no


Viewing all articles
Browse latest Browse all 295966

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>