V
V
Vladimir Vasiliev2017-02-21 00:03:12
Yii
Vladimir Vasiliev, 2017-02-21 00:03:12

yii2-debug not working. What could be wrong?

After yesterday 's article on Habré, I decided to install the panel myself. But nothing worked.
I read about the availability for IP and wrote the following in the config:

'bootstrap' => ['debug'],
'modules' => [
    'debug' => [
        'class' => 'yii\debug\Module',
        'allowedIPs' => ['*']
    ],
]

The project is running under vagrant with Nginx:
location / {
    try_files $uri /index.php?$query_string;
}
location = /index.php {
    try_files $fastcgi_script_name = 404;
    fastcgi_pass php-fpm;
    fastcgi_index index.php;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    include fastcgi_params;
}

Debugged a bit vendor\yiisoft\yii2-debug\Module.php
  • Panels are initialized
  • There is access
  • bootstrap worked
  • Data files are written to the runtime folder
  • renderToolbar not being called

What have I done wrong?
Update:
Worked on a working computer without problems. The home bar is missing.
However, the main idea was to look at the DB profiler in the API. And there is no layout in the API, it turns out that if you do not use rendering from Yii, then there is no sense in the plugin? This is true?
A few facts to clarify the problem:
1) What is the error? - The panel is not displayed at all.
2) Installation via composer.
3) Access rights to folders 775 and files 664. I work from under windows through vagrant and shared folder.
4) The current project uses its own assembly (but based on basic).
5) Since I have my own assembly, 1 config is used.
6) $this->endBody(); is in the layout

Answer the question

In order to leave comments, you need to log in

3 answer(s)
P
padlyuck, 2017-02-21
@bobahvas

if renderToolbar is not called, then the View::EVENT_END_BODY event does not fire, check that the method is called at the end of the layout

/** @var $this yii\web\View */
$this->endBody();

and here's another bug surfaced https://github.com/yiisoft/yii2-debug/issues/199

D
Dmitry, 2017-02-21
@slo_nik

Goodnight.
How did you set? Via composer update?
What exactly doesn't work?
What are the permissions on directories at runtime? Owner of www-data files?
Which yii2 are you using, basic or advanced?
In which configuration file did you register the module? See if it's listed somewhere else.

S
Slava Vitrenko, 2017-02-26
@mxuser

It also happens. Clearing the runtime folder often helps (just don't delete .gitignore)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question