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

OC 3.1.0.0_b Twig doesn't accept changes from view/*/before events #7149

Open
mhcwebdesign opened this Issue Jan 14, 2019 · 4 comments

Comments

Projects
None yet
2 participants
@mhcwebdesign
Copy link

mhcwebdesign commented Jan 14, 2019

After turning off caching for Theme and SASS in the admin Developer Settings the Twig rendering ignores all changes from lambda functions set by view//before events, including changes from the theme editor. In particular, all catalog/view//before handlers of priority 500 or higher ('event/theme' and others with template modifications) are ignored.

Is there any reason why this thing has to be so messy? Is there any reason why we can't use the Twig_Loader_Array instead of Twig_Loader_Filesystem? There are more bugs which I will report separately tomorrow.

@danielkerr

This comment has been minimized.

Copy link
Contributor

danielkerr commented Jan 16, 2019

you have to attach the template filter.

@mhcwebdesign

This comment has been minimized.

Copy link
Author

mhcwebdesign commented Jan 16, 2019

I did, using $template->addFilter(...) calls. And it works fine as long as caching is turned on in the admin Developer Settings for Theme and SASS. But it fails when caching is switched off.

@mhcwebdesign

This comment has been minimized.

Copy link
Author

mhcwebdesign commented Jan 16, 2019

Daniel, it's late night here now in the UK. But I'll post a working solution for this Twig issue, as well as for the other ones I posted about Twig (see #7152 and #7151), tomorrow morning.

@mhcwebdesign

This comment has been minimized.

Copy link
Author

mhcwebdesign commented Jan 17, 2019

I got a working solution for twig, still doing some more testing before posting it here.

Update: Now finished testing. All working fine, all fixed. I can post the solution here, or I can do a pull request,if you prefer the latter, let me know.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.