-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
Debug toolbar not showing on Symfony exception pages #41305
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
Comments
Same for me - toolbar is not loading and I'm getting EDIT: I guess it may be related to #41168 |
cc @weaverryan |
Can you please test #41346? |
@derrabus @weaverryan the problem was fixed with changes in the base_js.html.twig |
nicolas-grekas
added a commit
that referenced
this issue
May 21, 2021
…d also loading base_js Sfjs if needed (weaverryan) This PR was merged into the 4.4 branch. Discussion ---------- [WebProfilerBundle] Wrapping exception js in Sfjs check and also loading base_js Sfjs if needed | Q | A | ------------- | --- | Branch? | 4.4 | Bug fix? | yes | New feature? | no | Deprecations? | no | Tickets | Fix #41305 | License | MIT | Doc PR | Not needed This bug was introduced in #41168. Best viewed with: https://github.com/symfony/symfony/pull/41346/files?w=1 - we could also remove the new indentation in `exception.js`. In that PR, we innocently don't reload `Sfjs` if it doesn't exist. However, on an error page, that template ALSO adds an `Sfjs`, and that `Sfjs` is *smaller* - containing only a subset of the `Sfjs` functions. This is tricky, but this PR fixes it. Here are the various situations: 1) I hit an exception page. The `Sfjs` from `exception.js` is loaded first. This adds the smaller `Sfjs`. Then the `base_js.html.twig` version is hit. Because `Sfjs` is missing the `loadToolbar()` method, that code DOES run again to reinitialize it. 2) I am on a normal page, then travel to an exception page with Turbo. In this case, the original `Sfjs` from `base_js.html.twig` was processed. Then, on the exception page, the `Sfjs` from `exception.js` is ignored, as is the 2nd execution of `base_js.html.twig`. Overall, the JS could use some work for supporting things like Turbo (e.g. `DOMContentLoaded` doesn't work with Turbo, so the exception page JS is broken). But I wanted to focus on fixing the bug in this PR. As a reminder, #41168 (avoiding overriding `Sfjs`) was done to help with the AJAX toolbar and Turbo - it's explained in point (1) on #41168. Cheers! Commits ------- 5fa42f1 Wrapping exception js in Sfjs check and also loading base_js Sfjs if needed
@nacesprin it appears automatically when you use the |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Symfony version(s) affected: 4.4.22-24 (or 4.4.21-24)
Description

After upgrading to Symfony 4.4.24, the Symfony Exception pages no longer have the Debug Toolbar.
How it was in 4.4.19
Maybe a new configuration has been added that I missed?
Thanks.
The text was updated successfully, but these errors were encountered: