-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
JavaScript error on all Exception pages with profiler #25894
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
See #24281 also ;) |
@ro0NL yea, that one looks suspicious... but huge :). I was hoping you could help me navigate the possible cause - I'm a bit lost in this area 😇 |
AFAIK it's historic, never worked. Dunno :) General fix shouldnt be too hard.. assign/check a |
@ro0NL So in your opinion, it's not some bigger "clash" between the profiler and exception page JavaScript? On the surface, if you look at the code in 1c595fc, it looks like both the exception page and the web debug toolbar JavaScript call the same |
It is, yes. The exception page (TwigBundle) needs to work independent from the profiler (WebProfilerBundle). If you hit the exception page with profiler enabled then it conflicts.
The PR was a first cleanup to reduce the big copy/paste of javascript. But yeah both truly provide a JS api, rooted by If we can find a way to share frontend thingy's in general.. that be nice. I.e. the toggle links for logs in profiler is not available at the exception page. Maybe drop the JS features on the exception page? Gracefully enable if profiler is enabled? |
maybe the JS on the exception page should use a different variable for its JS to avoid clashing with the profiler (as they are meant to be usable separately or in parallel) |
This PR was merged into the 3.4 branch. Discussion ---------- [TwigBundle][WebProfilerBundle] Fix JS collision | Q | A | ------------- | --- | Branch? | 3.4 | Bug fix? | yes | New feature? | no | BC breaks? | no | Deprecations? | no | Tests pass? | yes/no | Fixed tickets | #25894 | License | MIT | Doc PR | symfony/symfony-docs#... <!--highly recommended for new features--> <!-- - Bug fixes must be submitted against the lowest branch where they apply (lowest branches are regularly merged to upper ones so they get the fixes too). - Features and deprecations must be submitted against the master branch. - Replace this comment by a description of what your PR is solving. --> Commits ------- da39e01 [TwigBundle][WebProfilerBundle] Fix JS collision
I can confirm this bug with current Symfony 3.4.4 version. |
@emschu AFAIK it will be in 3.4.5 |
When the profiler is present, the following JS error shows on every exception page:
To repeat:
Then go to any error page, like
http://localhost:8000/foo
.It appears that the
Sfjs.createTabs()
(that executes thecreateTabs()
method inbase_js.html.twig
of the WebProfilerBundle) is called twice. The first time works, but the second time, some classes (which were removed the first time) are missing.It's possible this came from 1c595fc#diff-de00cc2fe56e59a48a4d26e7a0dccca3, but I'm very not sure- maybe @ro0NL can prove/disprove my theory. Updated - it doesn't look like that specific change was the problem - as changing back has no effect. Sorry for the noise.Cheers!
The text was updated successfully, but these errors were encountered: