-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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
Debug toolbar doesn't load #5402
Comments
Are there any hints about where this closure is? |
This is a general problem of the debugger. Whenever there is a closure somewhere in the data that is logged by the debugger it will fail completely. We should skip the part of the data that fails and display the rest instead of failing the toolbar completely. |
No, not at all. The problem appears on every page, even on ‘empty’ ones (with nothing in the view). I’m sure it’s somewhere in the framework. Sjaak Priester mailto:[email protected] [email protected] Van: Alexander Makarov [mailto:[email protected]] Are there any hints about where this closure is? — |
Does this appear on a plain basic or advanced app? |
Both! Basic and advanced-->frontend. Sjaak Priester mailto:[email protected] [email protected] Van: Carsten Brandt [mailto:[email protected]] Does this appear on a plain basic or advaned app? — |
Which PHP Version and server are you using? Also did you make any changes to the application code? |
PHP 5.5.3 MySQL 5.5.21 Windows 7, IIS 7.5 Changes to app: not really. Modified css, emptied views/site/index.php. Sjaak Priester mailto:[email protected] [email protected] Van: Carsten Brandt [mailto:[email protected]] Which PHP Version and server are you using? Also did you make any changes to the application code? — |
Is there a stack trace with the error message? |
It’s just mentioned on its own at the bottom of the page, where the toolbar should be. app.log has a stack trace like this: Stack trace: Sjaak Priester mailto:[email protected] [email protected] Van: Carsten Brandt [mailto:[email protected]] Is there a stack trace with the error message? — |
After updating the branch, I get the same problem. And I'm receiving a confirmation window with a message 'tab', everytime when I click in any tab in request page lol. |
@llfm can you post a screenshot? |
Well... my problems were solved, I cleaned the assets folder. Weird. I was getting the same message as @sjaakp |
I found the problem. I did something clever in an AssetBundle to load Fontawesome, involving a closure. After removing that, the debug toolbar reappeared. It's not pretty, though, not being able to use closures. |
Hmm... do you still have a way to reproduce this smart stuff? We'd like to make debug toolbar bulletproof and it would be great to have reproduceable issue. |
Behold, my FontAwesomeAsset: class FontAwesomeAsset extends AssetBundle {
public $sourcePath = '@vendor/fortawesome/font-awesome';
public function init() {
$this->css = [ YII_DEBUG ? 'css/font-awesome.css' : 'css/font-awesome.min.css' ];
$this->publishOptions = [
'beforeCopy' => function($from, $to) {
return (strpos($from, '\css') !== false) || (strpos($from, '\fonts') !== false);
},
];
parent::init();
}
} I wanted to have just the css and fonts in the public assets-directory, not the less-stuff etc. |
…rces or PDO instances in the logged data
Fixed. Now debugger is OK with closures, resources and PDO instances. It cannot display closure code and instead just lists it as |
Reverted fix based on discussion at 084d355#commitcomment-8214995 and instead replaced with much simpler one that applies to assets only. |
@dimbs09 your issue is unlikely related to this one, also this issue is already closed, please open a new one. |
In Yii2rc the debug toolbar never loads. A message 'Not Found (#404): Unable to find debug data tagged with 'xxx'.' is issued.
app.log has this warning:
[::1][][pbkoi56d5uk9etajsg9btue116][warning][yii\log\Dispatcher::dispatch] Unable to send log via yii\debug\LogTarget: Exception 'Exception' with message 'Serialization of 'Closure' is not allowed'
In Yii2beta the debug toolbar did work correctly.
The text was updated successfully, but these errors were encountered: