This is true when the error occurs:
650) this.width=650; "src=" Https://s4.51cto.com/wyfs02/M00/8D/EF/wKioL1iv3Y6Q0RZzAABNTgc60Q4016.png "title=" Qq20170224151452.png "alt=" Wkiol1iv3y6q0rzzaabntgc60q4016.png "/>
Workaround:
In /basic/config/console.php and /basic/config/web.php , configure the components.
The contents of the console.php file are:
<?php$params = require (__dir__ . '/params.php '); $db = require (__DIR__ . '/db.php '); $config = [ ' id ' => ' basic-console ', ' BasePath ' => dirname (__dir__), ' Bootstrap ' => [' log '], ' controllernamespace ' => ' app\commands ', ' components ' => [ ' cache ' => [ ' class ' => ' yii\caching\ Filecache ', ], ' Log ' => [ ' targets ' = > [ [ ' class ' => ' Yii\log\filetarget ', ' Levels ' => [' ERROR ', ' warning '], ], ], ], ' db ' => $db, ' AuthManager ' => [' class ' => ' Yii\rbac\dbmanager ', ' itemTable ' => ' auth_item ', ' assignmenttable ' => ' auth_assignment ', ' itemchildtable ' => ' auth_item_child ', ' ruletable ' => ' auth_ Rule ',], ], ' params ' => $params, /* &nbsP; ' Controllermap ' => [ ' fixture ' => [ // Fixture generation command line. ' class ' => ' Yii\faker\fixturecontroller ', ], ], */];if (Yii_env_dev) { // configuration adjustments for ' Dev ' environment $config [' Bootstrap '][] = ' gii '; $config [' modules '] [' GII '] = [ ' class ' => ' Yii\gii\module ', ];} return $config;? >
When using RBAC, you should configure "AuthManager" component the use database before ...