-
Notifications
You must be signed in to change notification settings - Fork 73
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
Unknown property exception upon executing migration script #14
Comments
It's my mistake. I put enableCsrfValidation in common/config.php which led the console app to throw exception. I moved the setting to config files frontend and backend and now the migration works. |
Good to hear it's working :) |
I have a problem like this, but this solution does not work for me. I want to use Form Builder Extension but when I run migrate this shows. C:\xampp\htdocs\SEPreport>yii migrate/up --migrationPath=@vendor/pceuropa/yii2-forms/migrations
what do I have to do? please help me |
@mohammad1381 Something in your app is using request (eg. user via session), you need to find which component is doing that and disable it for console applications. It should have nothing to do with this extension. |
I installed the settings plugin via composer, but when I'm trying to create tables using migration script, I encountered the following issue. Any idea?
C:\projects\proj>yii migrate/up --migrationPath=@vendor/pheme/yii2-settings/migrations
←[0m←[31;1mException←[0m←[0m←[1;34m 'yii\base\UnknownPropertyException'←[0m with message ←[0m←[1m'Setting unknown property: yii\console\Request::enableCsrfValidation'←[0m
in C:\projects\proj\vendor\yiisoft\yii2\base\←[0m←[1mComponent.php←[0m:←[0m←[1;33m197←[0m
←[0m←[1mStack trace:
←[0m#0 C:\projects\med-appt\vendor\yiisoft\yii2\BaseYii.php(518): yii\base\Component->__set('enableCsrfValid...', false)
#1 C:\projects\med-appt\vendor\yiisoft\yii2\base\Object.php(105): yii\BaseYii::configure(Object(yii\console\Request), Array)
C:\projects\med-appt\vendor\yiisoft\yii2\di\Container.php(372): ReflectionClass->newInstanceArgs(Array)
C:\projects\med-appt\vendor\yiisoft\yii2\di\Container.php(151): yii\di\Container->build('yii\console\Req...', Array, Array)
C:\projects\med-appt\vendor\yiisoft\yii2\BaseYii.php(344): yii\di\Container->get('yii\console\Req...', Array, Array)
C:\projects\med-appt\vendor\yiisoft\yii2\di\ServiceLocator.php(133): yii\BaseYii::createObject(Array)
C:\projects\med-appt\vendor\yiisoft\yii2\base\Application.php(536): yii\di\ServiceLocator->get('request')
C:\projects\med-appt\vendor\yiisoft\yii2\base\Application.php(375): yii\base\Application->getRequest()
C:\projects\med-appt\yii(31): yii\base\Application->run()
{main}
The text was updated successfully, but these errors were encountered: