Open puppyceceyoyo opened 9 years ago
is it success install? please check folder vendor/mdmsoft/yii2-admin
I install it manually. the AccessControl.php is there inside vendor/mdmsoft/yii2-admin/components
If you install manual, you should add alias of path vendor/mdmsoft/yii2-admin
.
in your config, add
'aliases' => [
'@mdm/admin' => '@vendor/mdmsoft/yii2-admin',
]
http://www.yiiframework.com/doc-2.0/guide-concept-aliases.html
i already have added the alias after i installed manually.
I put in /vendor/yiisoft/extensions.php, is that correct?
'mdmsoft/yii2-admin' =>
array (
'name' => 'mdmsoft/yii2-admin',
'version' => '*',
'alias' =>
array (
'@mdm/admin' => $vendorDir . '/mdmsoft/yii2-admin',
),
),
i am not sure. you should not change content of vendor/yiisoft/extensions.php
. If you need add alias manually, add it via Application::$aliases
or via Yii::setAlias()
oh ok, but even I add the alias under aliases in my /config/web.php, it still the same error.
i installed using composer now, and configured all the things, now it gives me another ReflectionException.
ReflectionException Class user does not exist
I had the same issue;
For me the problem was that I added the 'as access'
config section to the common/config.php
and because of that the console application now also suddenly needs a user component which it doesn't have. I added the 'as access'
section to the front/backend config only. The 'modules'
part in can be left in the common config.
@Hommer101 i'm using yii2 basic and i got the same problem. i found i have a directory named "mdm\admin\classes\" instead of "mdm\admin\components\", and it also has a file names "AccessControl.php". so i changed the config file from
'class' => 'mdm\admin\components\AccessControl',
to
'class' => 'mdm\admin\classes\AccessControl',
and the error has gone.
however, i got a new problem now.
The file or directory to be published does not exist: /var/www/zhixing/admin/vendor/bower/angular
what a tough day.
@liupangzi Version 3.x totally different with previous version. Its not easy install without composer. prefer download 2.x version.
I change 'class' => 'mdm\admin\components\AccessControl' to 'class' => 'mdm\admin\classes\AccessControl' and it run, but i don not known how to use it
i move 'mdm\admin\components\AccessControl' to my app components 'app\components\AccessControl' and adjust several change. It works.
yes, i move it to the directory 'backend\components',it works.
I have this error when I access the /admin page. I put the configuration under /config/web.php. Is that correct for basic template? Can someone pls help?