Enable debug in back-end
Log as admin in frontend
Enter a fake url in frontend
Error page is loaded.
Debug should display at bottom of page
Debug does not display although we do have
<jdoc:include type="modules" name="debug" style="none" />
in error.php
Labels |
Added:
?
|
I am logged as Admin.
How to solve this?
code is in line 346
echo str_replace('</body>', $debugBarRenderer->renderHead() . $debugBarRenderer->render() . '</body>', $contents);
and the whole code is present before </body>
in page source.
Do you have any errors in the browser's console?
Many
Uncaught ReferenceError: jQuery is not defined
<anonymous> http://localhost:8888/newfolder/joomla40/media/vendor/debugbar/debugbar.js:4
debugbar.js:4:5
10:55:18.428
Uncaught TypeError: PhpDebugBar.utils is undefined
<anonymous> http://localhost:8888/newfolder/joomla40/media/vendor/debugbar/widgets.js:14
<anonymous> http://localhost:8888/newfolder/joomla40/media/vendor/debugbar/widgets.js:583
widgets.js:14:18
10:55:18.428
Uncaught TypeError: PhpDebugBar.Widget is undefined
<anonymous> http://localhost:8888/newfolder/joomla40/media/vendor/debugbar/openhandler.js:13
<anonymous> http://localhost:8888/newfolder/joomla40/media/vendor/debugbar/openhandler.js:202
openhandler.js:13:5
10:55:18.428
Uncaught TypeError: PhpDebugBar.utils is undefined
<anonymous> http://localhost:8888/newfolder/joomla40/media/plg_system_debug/widgets/info/widget.min.js:1
<anonymous> http://localhost:8888/newfolder/joomla40/media/plg_system_debug/widgets/info/widget.min.js:1
widget.min.js:1:20
10:55:18.428
Uncaught TypeError: PhpDebugBar.utils is undefined
<anonymous> http://localhost:8888/newfolder/joomla40/media/plg_system_debug/widgets/sqlqueries/widget.min.js:1
<anonymous> http://localhost:8888/newfolder/joomla40/media/plg_system_debug/widgets/sqlqueries/widget.min.js:1
widget.min.js:1:20
etc.
jQuery is not defined
There you go. Add before
joomla-cms/plugins/system/debug/debug.php
Line 223 in c2570c2
JHtml::_('jquery.framework');
You are quoting staging.
I am speaking of 4.0
If I add HTMLHelper::_('jquery.framework');
on top of error.php, then it works.
Weird the jQuery is defined as dependency here:
joomla-cms/plugins/system/debug/debug.php
Line 209 in 9d38cbf
Do you have a js file loaded in the browser with path media/plg_system_debug/js/debug.min.js
?
No, in index.php (where it works) as well as error.php
I have at bottom of page
<script type="text/javascript" src="/newfolder/joomla40/media/vendor/debugbar/debugbar.js" defer></script>
EDIT: In fact I have them in index.php, not in error.php
It worked for me yesterday, without errors. Today not tested.
Any changes in 4.0-dev branch happen recently? :)
ahh, I misunderstood, sorry,
yeah it broken on 404 page
okay I see,
That because it is DocumentError and it a different Document instance from initial.
debug.js attached to original DocuemtHtml, but "on error" the error handler proceed DocumentError
I will try to look later, how to fix that.
You mean
* @todo Change this renderer to use JDocumentHtml instead of JDocumentError, the latter is only used for B/C at this time
in
/libraries/src/Error/Renderer/HtmlRenderer.php
?
hm, or maybe Yes
well, it confusing
but the document instance changes in
joomla-cms/libraries/src/Exception/ExceptionHandler.php
Lines 123 to 127 in 9d38cbf
need to change how the plugin attach the script
OK
Status | New | ⇒ | Closed |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2021-02-08 18:32:56 |
Closed_By | ⇒ | Quy |
Debug is NOT using the template position
joomla-cms/plugins/system/debug/debug.php
Line 347 in c2570c2