A
A
alex995052018-04-04 22:03:05
Yii
alex99505, 2018-04-04 22:03:05

What is the Yii2 debug setting error?

Debug works fine on local.
And here on a hosting all I can not start in any way. Mistake

Calling unknown method: yii\debug\panels\ConfigPanel::isEnabled()

if (is_string($config)) {
                $config = ['class' => $config];
            }
            $config['module'] = $this;
            $config['id'] = $id;
            $this->panels[$id] = Yii::createObject($config);
            if ($this->panels[$id] instanceof Panel && !$this->panels[$id]->isEnabled()) {
                unset($this->panels[$id]);
            }

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry, 2018-04-04
@slo_nik

Goodnight. First, try specifying a parameter for the debug module
in the configuration file. In the parameter value, pass your ip, from which you access the hosting. You can find it on 2ip.ruallowedIPS

if (YII_ENV_DEV) {
    // configuration adjustments for 'dev' environment
    $config['bootstrap'][] = 'debug';
    $config['modules']['debug'] = [
        'class' => 'yii\debug\Module',
        'allowedIPs' => ['тут_ваш_ip']
    ];
}

And of course the developer mode must be set.

N
nickspro, 2018-06-26
@nickspro

I had something on localhost that didn’t work through localhost
commented out 'allowedIPs' => ['*'] and everything worked

$config['bootstrap'][] = 'debug';
    $config['modules']['debug'] = [
        'class' => 'yii\debug\Module',
     //    'allowedIPs' => ['*'],
    ];

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question