cancel
Showing results for 
Search instead for 
Did you mean: 

Can't login into admin area: Could not create an acl object: Parent Role id '1' does not exist

SOLVED

Can't login into admin area: Could not create an acl object: Parent Role id '1' does not exist

Hi

 

I have tried to find something online and searched here without results. 

Now we get an exception message if we try to login to the backend.

 

How this happened:

 

1. cleared the cache (Configuration)

2. it was confirmed and at the same time i got a message invalid permission

3. tried to relogin and got the exception below:

 

1 exception(s): Exception #0 (LogicException): Could not create an acl object: Parent Role id '1' does not exist Exception #0 (LogicException): Could not create an acl object: Parent Role id '1' does not exist #0 /home/cloudpanel/htdocs/www.peterstone.com/generated/code/Magento/Framework/Acl/Builder/Proxy.php(95): Magento\Framework\Acl\Builder->getAcl() #1 /home/cloudpanel/htdocs/www.peterstone.com/vendor/magento/module-backend/Model/Auth/Session.php(227): Magento\Framework\Acl\Builder\Proxy->getAcl() #2 /home/cloudpanel/htdocs/www.peterstone.com/generated/code/Magento/Backend/Model/Auth/Session/Interceptor.php(102): Magento\Backend\Model\Auth\Session->processLogin() #3 /home/cloudpanel/htdocs/www.peterstone.com/vendor/magento/module-backend/Model/Auth.php(159): Magento\Backend\Model\Auth\Session\Interceptor->processLogin() #4 /home/cloudpanel/htdocs/www.peterstone.com/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Backend\Model\Auth->login('test123', 'test123') #5 /home/cloudpanel/htdocs/www.peterstone.com/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Backend\Model\Auth\Interceptor->___callParent('login', Array) #6 /home/cloudpanel/htdocs/www.peterstone.com/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Backend\Model\Auth\Interceptor->Magento\Framework\Interception\{closure}('test123', 'test123') #7 /home/cloudpanel/htdocs/www.peterstone.com/generated/code/Magento/Backend/Model/Auth/Interceptor.php(78): Magento\Backend\Model\Auth\Interceptor->___callPlugins('login', Array, Array) #8 /home/cloudpanel/htdocs/www.peterstone.com/vendor/magento/module-backend/App/Action/Plugin/Authentication.php(205): Magento\Backend\Model\Auth\Interceptor->login('test123', 'test123') #9 /home/cloudpanel/htdocs/www.peterstone.com/vendor/magento/module-backend/App/Action/Plugin/Authentication.php(157): Magento\Backend\App\Action\Plugin\Authentication->_performLogin(Object(Magento\Framework\App\Request\Http)) #10 /home/cloudpanel/htdocs/www.peterstone.com/vendor/magento/module-backend/App/Action/Plugin/Authentication.php(125): Magento\Backend\App\Action\Plugin\Authentication->_processNotLoggedInUser(Object(Magento\Framework\App\Request\Http)) #11 /home/cloudpanel/htdocs/www.peterstone.com/vendor/magento/framework/Interception/Interceptor.php(135): Magento\Backend\App\Action\Plugin\Authentication->aroundDispatch(Object(Magento\Backend\Controller\Adminhtml\Index\Index\Interceptor), Object(Closure), Object(Magento\Framework\App\Request\Http)) #12 /home/cloudpanel/htdocs/www.peterstone.com/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Backend\Controller\Adminhtml\Index\Index\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http)) #13 /home/cloudpanel/htdocs/www.peterstone.com/generated/code/Magento/Backend/Controller/Adminhtml/Index/Index/Interceptor.php(3...): Magento\Backend\Controller\Adminhtml\Index\Index\Interceptor->___callPlugins('dispatch', Array, NULL) #14 /home/cloudpanel/htdocs/www.peterstone.com/vendor/magento/framework/App/FrontController.php(55): Magento\Backend\Controller\Adminhtml\Index\Index\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http)) #15 /home/cloudpanel/htdocs/www.peterstone.com/vendor/magento/framework/Interception/Interceptor.php(58): Magento\Framework\App\FrontController->dispatch(Object(Magento\Framework\App\Request\Http)) #16 /home/cloudpanel/htdocs/www.peterstone.com/vendor/magento/framework/Interception/Interceptor.php(138): Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', Array) #17 /home/cloudpanel/htdocs/www.peterstone.com/vendor/magento/framework/Interception/Interceptor.php(153): Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Request\Http)) #18 /home/cloudpanel/htdocs/www.peterstone.com/generated/code/Magento/Framework/App/FrontController/Interceptor.php(26): Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', Array, Array) #19 /home/cloudpanel/htdocs/www.peterstone.com/vendor/magento/framework/App/Http.php(135): Magento\Framework\App\FrontController\Interceptor->dispatch(Object(Magento\Framework\App\Request\Http)) #20 /home/cloudpanel/htdocs/www.peterstone.com/generated/code/Magento/Framework/App/Http/Interceptor.php(24): Magento\Framework\App\Http->launch() #21 /home/cloudpanel/htdocs/www.peterstone.com/vendor/magento/framework/App/Bootstrap.php(256): Magento\Framework\App\Http\Interceptor->launch() #22 /home/cloudpanel/htdocs/www.peterstone.com/pub/index.php(37): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor)) #23 {main}

 

php magento setup:upgrade -> Something went wrong while compiling a list of allowed resources. You can find out more in the exceptions log.
Log:


[2018-05-17 01:04:40] main.CRITICAL: Could not create an acl object: Parent Role id '1' does not exist {"exception":"[object] (LogicException(code: 0): Could not create an acl object: Parent Role id '1' does not exist at /home/cloudpanel/htdocs/www.peterstone.com/vendor/magento/framework/Acl/Builder.php:70)"} []

 

Any ideas around how to fix? Right now we cant work without accessing the site..

 

Thanks
Björn

6 REPLIES

Re: Can't login into admin area: Could not create an acl object: Parent Role id '1' does not exist

Hi @Bmacuser

 

it looks like you have issue of ACL permission issue.

 

do you have installed any custom theme or custom/third-party extension ? - the problem is something related to your acl.xml file where resource acl permission issue occurs.

 

Kindly create new admin user using command line from SSH terminal run below command.

 

php bin/magento admin:user:create --admin-user='new-admin' --admin-password='!admin123!' --admin-email='info@domain.com' --admin-firstname='Jon' --admin-lastname='Doe'

After that logged in via this new user and check you are able to logged in or not !!

 

If yes - then logged in and check the permission of previous user which you are trying to logged in and get the error.

 

Hope it helps !

if issue solved,Click Kudos & Accept as Solution

Re: Can't login into admin area: Could not create an acl object: Parent Role id '1' does not exist

Hi

Thanks for your reply. I created a user exactly like your example and the exception is the result of the new created user. All our admin accounts are ending up in that result. Yes our Theme company did customization on the theme default.xml file  and catalog category/product view file. These changes have been made a few days ago and the error arrived just this morning.


Re: Can't login into admin area: Could not create an acl object: Parent Role id '1' does not exist

Hi @Bmacuser

 

okay i understand - can you please share your authorization_role table 's screenshot or data what is there in it from your database ?

 

looks like something missing in your role table only !!

 

Also run below query in authorization_table and check it is working for you or not

 

UPDATE authorization_role SET tree_level = 2 WHERE role_type = “U”;

Note : Before running anything on database , make sure you take a backup - so if something goes wrong we can revert back it for the same

if issue solved,Click Kudos & Accept as Solution

Re: Can't login into admin area: Could not create an acl object: Parent Role id '1' does not exist

Awesome! Thanks. One admin account had "1" as mentioned in the exception file. I have to contact our migration company who created that issue. Thanks for your help!

 

Re: Can't login into admin area: Could not create an acl object: Parent Role id '1' does not exist

Hi @Bmacuser

 

Glad to know that you have resolved your issue , Happy to help and keep helping Smiley Happy

if issue solved,Click Kudos & Accept as Solution

Re: Can't login into admin area: Could not create an acl object: Parent Role id '1' does not exist

Hi i have the same exact problem too but the above solution didn't work for me...

 

this is my role table:

db_role.png