Everywhere on all forms an error occurs:

400 Bad Request

Here is the csrf :

 d0ee39aee894ffc9b6d42d4f87debe40e8eda9554fcc6b86b85f370261bd0b1da:2:{i:0;s:5:\"_csrf\";i:1;s:32:\"GIbpFnsIsgItxlnjiMy5p8oBr5M1wD0K\";} 

This is what the debager says:

 8 07:41:51.213 trace yii\base\Controller::runAction Route to run: image/create 9 07:41:51.223 error yii\web\HttpException:400 exception 'yii\web\BadRequestHttpException' with message 'Не удалось проверить переданные данные.' in C:\OpenServer\domains\film.lc\vendor\yiisoft\yii2\web\Controller.php:110 Stack trace: #0 C:\OpenServer\domains\film.lc\vendor\yiisoft\yii2\base\Controller.php(152): yii\web\Controller->beforeAction(Object(yii\base\InlineAction)) #1 C:\OpenServer\domains\film.lc\vendor\yiisoft\yii2\base\Module.php(454): yii\base\Controller->runAction('create', Array) #2 C:\OpenServer\domains\film.lc\vendor\yiisoft\yii2\web\Application.php(84): yii\base\Module->runAction('image/create', Array) #3 C:\OpenServer\domains\film.lc\vendor\yiisoft\yii2\base\Application.php(375): yii\web\Application->handleRequest(Object(yii\web\Request)) #4 C:\OpenServer\domains\film.lc\backend\web\index.php(18): yii\base\Application->run() #5 {main} 

Tell me, what could be the case or how to test the error?

Closed due to the fact that off-topic participants VenZell , aleksandr barakin , cheops , zRrr , Saidolim 6 May '16 at 5:39 .

It seems that this question does not correspond to the subject of the site. Those who voted to close it indicated the following reason:

  • "The question is caused by a problem that is no longer reproduced or typed . Although similar questions may be relevant on this site, solving this question is unlikely to help future visitors. You can usually avoid similar questions by writing and researching a minimum program to reproduce the problem before publishing the question. " - VenZell, aleksandr barakin, cheops, zRrr, Saidolim
If the question can be reformulated according to the rules set out in the certificate , edit it .

  • accidentally not ajax? - Urmuz Tagizade
  • it turned out to be all the easier I use the adminLTE widget and there I renamed one variable and got a bunch of problems (apparently it was connected with a token like that) - Sergalas

1 answer 1

Perhaps you should turn off csrf checking. For example:

 public function beforeAction($action) { $this->enableCsrfValidation = ($action->id !== "<action>"); return parent::beforeAction($action); } 
  • And put yourself in danger? What for. - Sergalas