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?
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | Screen Shot 2016-08-25 at 8.49.47 PM.png | 231.95 KB | frogdog_tech |
| #3 | Screen Shot 2016-08-25 at 8.48.55 PM.png | 202.62 KB | frogdog_tech |
| #3 | Screen Shot 2016-08-25 at 8.45.55 PM.png | 231.01 KB | frogdog_tech |
| #3 | Screen Shot 2016-08-25 at 8.47.26 PM.png | 207.07 KB | frogdog_tech |
| Screen Shot 2016-08-25 at 8.37.22 PM.png | 132.21 KB | frogdog_tech |
Issue fork drupal-2790357
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
frogdog_tech commentedComment #3
frogdog_tech commentedComment #4
frogdog_tech commentedComment #5
frogdog_tech commentedComment #6
joelpittetCould you add the minimum steps to reproduce this to the issue summary?
Comment #7
frogdog_tech commentedseems to have fixed itself after core update.
Comment #8
joelpittetSweet, thanks @squidgle
Comment #9
auseidon986 commentedThis issue is back again.
Comment #10
gábor hojtsyMoving to 11.x as per https://www.drupal.org/about/core/blog/new-drupal-core-branching-scheme-..., please reopen if not outdated.
Comment #11
drunir commentedi have the same issue in drupal 10.1.2
Comment #12
drunir commented