Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 293832

Single Directory Components templates are not auto reloaded after change

$
0
0

Problem/Motivation

When twig.config:auto_reload is true, the component's templates are not refreshed, they only refreshed after the change to the YML file.
This is also weird because the parsed YML file is cached separately anyway.

This issue lies in \Drupal\Core\Template\Loader\ComponentLoader::isFresh. It is checking the YML file, and if YML is not updated, it will never check the template itself.

Steps to reproduce

Set twig.config:auto_reload to true
Create component
Render component
Change the component's template
The component still renders the old contents while the usual templates are refreshed.

Proposed resolution

Always check if the template file is fresh. Not sure the YML file needs to be checked at all since its contents will be cached anyway.

Remaining tasks

-

User interface changes

-

API changes

-

Data model changes

-

Release notes snippet

-


Viewing all articles
Browse latest Browse all 293832

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>