-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Set twig globals after first admin instanciation #8125
Conversation
b4e52bd
to
7954685
Compare
I should have converted it to draft but did not find the button. It's done now. |
Thanks ! |
Sorry for the late feedback. This solution does only work if your Controller extends the If you want to create small (batch) action controller, there is no need to extend that controller and this solution does not work. |
If you don't extend CRUDController, then do you really need 'admin' and 'base_template' variables in twig ? Before these globals were set, if extended CRUDController then we had to use CRUDController::renderWithExtraParams to render the template. Without extending CRUDController, if we wanted these variable in twig, we had to add them ourself when rendering the template. In the end, it would work like before no ? |
Unfortunately this breaks when inside long-running process like roadrunner. It throws exception that |
Hi, can you try the 4.29.1 version ? |
I saw the fix, but isn't that just hiding the error? Seems like the global twig variable |
I'm not sure about this since the code allows to update globals:
|
Yes, but only if no exception is thrown? In our case - exception IS thrown. |
According to Exception is thrown only if the global doesn't exists and the extension is initialized. Let's end this theoretically discussion here and wait for a well-reported bug instead if it exists. |
Fixes #8120
Changelog