Description
Symfony version(s) affected
≥ 5.4
Description
Since #42195 the UI of logs changed between the profiler and the exception page so createFilters
was removed from base_js.html.twig
’s Sfjs
.
exception.js
also defines its own Sfjs
with a createFilters
method it calls on DOMContentLoaded
.
Problem is, base_js.html.twig
’s Sfjs
overrides exception.js
’ one because the latter does not define loadToolbar
.
As a result, when DOMContentLoaded
kicks in, Sfjs.createFilters
is called while it does not exist anymore so an error is logged and filters don’t work.
Uncaught TypeError: Sfjs.createFilters is not a function
Else, the UI would look like this on exception pages:
How to reproduce
Display the ErrorHandler
’s exception page with some logs and the profiler’s toolbar enabled.
Possible Solution
Not sure about this. The fact the web profiler and error handler can override each other’s Sfjs
seems weird.
Also, remnants of Sfjs.createFilters
are still present in translation.html.twig
.