On my development, local site (twig debug enable, cache disable), I create node template for specific view block by Drupal suggestions:
<!-- THEME DEBUG -->
<!-- THEME HOOK: 'node' -->
<!-- FILE NAME SUGGESTIONS:
* node--view--promoted-content--block-promoted-content.html.twig
x node--view--promoted-content.html.twig
* node--7398--teaser.html.twig
* node--7398.html.twig
* node--news--teaser.html.twig
* node--news.html.twig
* node--teaser.html.twig
* node.html.twig
-->
<!-- BEGIN OUTPUT from 'themes/custom/anime24/templates/content/node--view--promoted-content.html.twig' -->
And exactly: node--view--promoted-content.html.twig
, and all seams to work perfectly:
But when I move site to production (standard hosting, disable twig debug, enable cache), Drupal ignore my node--view--[machine-name].twig.html
templates, and load node--teaser.html.twig
:
It looks like some weird cache issue, because, when I reload one of Block with AJAX filter, it loads an proper twig template:
And after click:
Has anyone encountered this error and is able to help me with the solution?
Thanks!
sites/default/files/php/twig
and clear databasecache_
tables. Drush unfortunately not working on my server.