Closed DikkiX closed 1 year ago
It never the nguide doesnt talk about any rbac item
@Cuji12
Off the top of my head I'm not sure but I can see you've declared a components array twice in your common/config/main.php and your authManager twice - you should make sure there's no duplicates in that file, from the Yii2 RBAC docs: "In case of yii2-advanced-app the authManager should be declared only once in common/config/main.php."
Also make sure you've ran your migrations for RBAC via "yii migrate --migrationPath=@yii/rbac/migrations".
Looks like someone faced a similar issue here: https://forum.yiiframework.com/t/console-command-failed-solved/74195/12?page=2 which may help you too.
Off the top of my head I'm not sure but I can see you've declared a components array twice in your common/config/main.php and your authManager twice - you should make sure there's no duplicates in that file, from the Yii2 RBAC docs: "In case of yii2-advanced-app the authManager should be declared only once in common/config/main.php."
i cant see an duplicate in my config
So, i found the page that directs it.
but i changed it but now it shows this.
it should't say backend. u know a way to fix this?
fixed it!
Haha nice one, assuming it was the issue where you were declaring RBAC - good luck with your project! On a side note, if you're interested in furthering your PHP education I'd recommend this book.
Haha nice one, assuming it was the issue where you were declaring RBAC - good luck with your project! On a side note, if you're interested in furthering your PHP education I'd recommend this book.
Yess, thanks i will check the book for sure i need it!!!
One last issue tho,
I just went thru everything and found a problem. When submitting in my form it does nothing, i dont even get an error just no response. u know this fix?? Its in my frontend view/overzicht
Hi maybe u have an idea,
I followed the rbac guide again and now have new problems. When creating an new Role and keeping the rule area empty, i get this error.
`PHP Warning – yii\base\ErrorException file_put_contents(C:\xampp\htdocs\Schoolproject\backend/rbac/items.php): Failed to open stream: No such file or directory
in C:\xampp\htdocs\Schoolproject\vendor\yiisoft\yii2\rbac\PhpManager.phpat line 799 790791792793794795796797798799800801802803804805806807808 /**
/**