yii-debug-toolbar
yii-debug-toolbar copied to clipboard
Disable and hide yii-debug-toolbar when jQuery is not defined.
Console error which halts the javascript on the whole page. Uncaught ReferenceError: jQuery is not defined.
Temporary quick solution is to exclude debug-toolbar scripts from script map For example if you exclude jquery.js from script map. You may also exclude these scripgs
this code is in Controller::init
$cs = Yii::app()->clientScript; $cs->scriptMap["jquery.js"] = false;
$cs->scriptMap['yii.debugtoolbar.js'] = false; $cs->scriptMap['yii.debugtoolbar.css'] = false;
but there is another problem that toolbar generate service info that contains in layout I solve this problem (in my case it is at module, but you also can do it at the same Controller::init) by disabling debug toolbar
/* @var CLogRouter $log */ $log = Yii::app()->log; foreach($log->routes as $logRoute) { if($logRoute instanceof YiiDebugToolbarRoute) { $logRoute->enabled = false; } }