Problem/Motivation

Depending on $context['in_preview'] theme key is one of links__comment or links__comment__comment (\Drupal\comment\CommentPostRenderCache::buildLinks())
Also it looks that altered array of links has different structure

Proposed resolution

Bring consistency in comment links render:

* use link__comment
* discover why comment_links are not altered for preview
* cover with tests

Remaining tasks

tbd

User interface changes

no

API changes

no

Comments

jcandan’s picture

As a first-time-contributor-workshop attendee (Novice), but experienced D7 developer, I would appreciate clarity on the problem and proposed resolution. I wasn't able to find any instances where CommentPostRenderCache::buildLinks was being used in the github repo for Drupal core. What have I missed?

larowlan’s picture

It's a service based post render callback. If you check comment.services.yml you will find the service ID. Grep for that to find the calls

chaussette’s picture

Hello, i'm new to drupal, but i am experienced symfony developper, i'll try to privide help, i have free time right now

chaussette’s picture

For further information and to provide help if I don't manage to solve this issue, the problem is related to themes, you can find the unconsitant line in Drupal core comment module, the path is : \Drupal\Core\Module\Comment\src\CommentPostRenderCache.php line n°235

chaussette’s picture

Investigating there is a file called CommentLinkBuilder wich seems suspicious especially the buildCommentedEntityLinks from line 194

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

cilefen’s picture

Issue tags: -Novice

This is not Novice as evidenced in the comments.

andypost’s picture

Status: Active » Closed (cannot reproduce)

Looks that no more an issue, we not rendering comment links in preview