links--node--statistics.html.twig not working as template suggestion even though Statistics module defines #theme as links__node__statistics

Created on 1 April 2022, over 2 years ago
Updated 6 May 2024, 4 months ago

Problem/Motivation

Trying to target styling the "view" link added by Statistics module through an implementation of hook_node_links_alter(), created a template links--node--statistics.html.twig because i saw it used '#theme' => 'links__node__statistics' even though the twig debug FILE NAME SUGGESTIONS were only links--node.html.twig and links.html.twig.

This is beyond just the suggestions though, because the template itself is not picked up, even though it really should be, right?

Steps to reproduce

Create links--node--statistics.html.twig in your custom theme's template directory. It won't be picked up, but a links--node.html.twig file will be.

Proposed resolution

Remaining tasks

🐛 Bug report
Status

Postponed: needs info

Version

11.0 🔥

Component
Theme 

Last updated 1 day ago

Created by

🇺🇸United States mlncn Minneapolis, MN, USA

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.

  • 🇺🇸United States bnjmnm Ann Arbor, MI

    If steps to reproduce are provided that don't require the presence of the statistics module, this can probably be looked at, but with the information as provided there's nothing to suggest one way or the other that this is something addressable by a change to drupal Core.

Production build 0.71.5 2024