Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Newly added theme files not located until cache cleared #95

Open
drjones69 opened this issue Apr 11, 2014 · 3 comments
Open

Newly added theme files not located until cache cleared #95

drjones69 opened this issue Apr 11, 2014 · 3 comments

Comments

@drjones69
Copy link

Good afternoon,
Just started with LiipThemeBundle - so apologies if I'm trying to run before i can walk.

I have set up 2 themes (say, Brand1 and Brand2) and set fallback to Resources/views/

If I have a template which loaded from the fallback - this works. If I then place a template in (say) Resources/themes/Brand1/ and reload the page, it still pulls the template from the fallback.

Once I clear the cache though, the newly added override template is (correctly) loaded.

I think the cause is down in the Liip\ThemeBundle\Locator\TemplateLocator::locate method - as I understand things, once a template is added to the cache, the locator method then relies on this rather than relocating the template.

Would this be better to use the %%kernel_debug%% value, and always relocate the template if the app is in an environment with debug=true?

Regards,
Ryan

@oleg-andreyev
Copy link
Contributor

For this purpose Symfony has cache warmer and bundle is replacing templating.cache_warmer.template_paths with liip_theme.templating.cache_warmer.template_paths. And here Kernel is deciding call it or no.

@lsmith77
Copy link
Contributor

either way, I guess in the dev env the expectation is to not have to manually clear caches

@lsmith77
Copy link
Contributor

lsmith77 commented May 9, 2015

can you test master?

@lsmith77 lsmith77 added this to the 1.3.0 milestone May 10, 2015
@lsmith77 lsmith77 modified the milestones: 1.3.0, 1.4.0 Aug 28, 2015
@lsmith77 lsmith77 removed this from the 1.4.0 milestone Jan 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants