Debugging this issue I found out that:
This is caused because this line of code in the libraries/src/Application/CMSApplication.php
file:
$uri = clone Uri::getInstance();
gets a value of:
http://joomlacms.test/media/vendor/css-vars-ponyfill/js/css-vars-ponyfill.js.map
The router can't find a route for this and throws an exception.
Debug bar is displayed when enabled and page is rendered using the regular page renderer.
No debug bar is displayed and the page is rendered using the error page renderer.
Joomla 4.0-dev branch
PHP 7.2 / PHP 7.3
MySQL 5.7
Labels |
Added:
?
|
In sort add: HTMLHelper::_('jquery.framework') in the debugBar layouts...
Too good to be true, it isn't that easy otherwise I would have done so already.
This line removes jQuery again:
joomla-cms/plugins/system/debug/debug.php
Line 291 in 9c229a2
If you remove that line, jQuery is added twice. Regardless of that, this code is placed in the head and Joomla is placing JS files at the end, so jQuery is loaded too late.
All I can see for now is that we do remove that line and then remove the debugbar jQuery from the output.
@elkuku Any ideas here?
The line you linked disables the jQuery library shipped with the DebugBar package, that has no affect on jQuery loaded through the HTML or Document APIs.
This line removes jQuery again:
So after the line add the Joomla's HTMLHelper for loading the jQuery. That should do the trick!
Edit: I just saw that this is using the assets manager and quite honestly I have no clue, still HTMLHelper should work but it's not the right way to mix different methods
@roland-d so I figure out why this is breaking. In all the files in the dir: plugins/system/debug/DataCollector/InfoCollector.php
the assets are handled by the DebugBar. That's wrong, we need to use Joomla's API to ensure consistency. So
joomla-cms/plugins/system/debug/DataCollector/InfoCollector.php
Lines 90 to 106 in d0c00c5
('relative' => true)
and also set the media version to auto.
That should do it
ah, cache hahaha
@dgrammatiko was faster, I close mine
@dgrammatiko Thank you
@Fedik Can you test #23639 as well?
Closing this as we have a PR.
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2019-01-23 06:44:03 |
Closed_By | ⇒ | roland-d |
If DebugBar is depending on jQuery then it should make sure it's loaded. The templates should not force jQuery.
This is intended. Actually if devs were more aware of the benefits of having the scripts before the body closing tags the product will be so much more performant...
In sort add:
HTMLHelper::_('jquery.framework')
in the debugBar layouts...