Theme Hook Suggestions Incorrect and Changes on Cache Rebuild

Created on 26 August 2016, almost 8 years ago
Updated 24 August 2023, 10 months ago

I have two views:

  • The first with a view ID 'case_studies' and a display ID of 'home_promo'.
  • The second with a view ID 'work' and a display ID of 'work_list'.

They both display Case Study nodes, but in two different fashions. Currently, the theme hook suggestions are always wrong on one of the views and this changes every time I a perform a `drush cr`

Here is what I'm currently seeing for the 'home_promo' display of 'case_studies':

Case Studies theme hook suggestions

You can see the theme hook for the view is correct, but once the nodes are rendered in the view the theme hook suggestions are incorrect (should be 'node--view--case-studies--home-promo.html.twig) and are for the
'work-list' display id of my 'work' view. How is this possible?

The hook suggestions on the 'work' view are fine:

Work List theme hook suggestions

Now...Here comes the rub. If I perform a `drush cr`. The 'case_studies' hook suggestions are now correct, and the 'work' view is incorrect:

Case Studies theme hook suggestions

Work List theme hook suggestions

Now using the incorrect: node--view--case-studies--home-promo.html.twig

The suggestions just keep flip flopping like this on every cache clear. This seems to be something fundamentally broken in how the hook suggestions are produced for nodes in a view?

๐Ÿ› Bug report
Status

Active

Version

11.0 ๐Ÿ”ฅ

Component
Themeย  โ†’

Last updated 2 days ago

Created by

๐Ÿ‡บ๐Ÿ‡ธUnited States frogdog_tech

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