cancel
Showing results for 
Search instead for 
Did you mean: 

Magento 2.3 Admin Panel ID already exists

Magento 2.3 Admin Panel ID already exists

I was trying to edit a user role (System -> Permission -> User Roles) on the magento 2.3.1 admin panel and I started to get this error:

[2019-06-17 08:34:01] main.CRITICAL: Item (Magento\User\Model\User\Interceptor) with the same ID "11" already exists. [] []
[2019-06-17 08:34:01] main.CRITICAL: The "adminhtml.user.editroles" block threw an exception, and it can't be rendered. [] []

I've tried to google the issue and I've seen similar errors relating to products, however, nothing to do with user roles. I've also seen a similar issue on a different post, but it does not seem to be related to users and rather products.

 

The result of this error is that I see a mostly blank page with no ability to edit the assets that a role has access to. I've also tried to edit other parts on the admin panel including some blog posts that I have and I'm unable to do this because of the same error.

 

I've checked the admin_user table and I don't see any duplicate IDs. Let me know where else I may need to check.

 

Appreciate the help. Thanks!

4 REPLIES 4

Re: Magento 2.3 Admin Panel ID already exists

A bit of additional information, the same error also occurs when I try to edit a blog post. However, this also generates a stack track which may help give a bit more information:

 

[2019-06-27 18:41:31] main.CRITICAL: Exception message: Item (Magento\User\Model\User\Interceptor) with the same ID "11" already exists.
Trace: <pre>#1 Magento\Framework\Data\Collection\AbstractDb->loadWithFilter(false, false) called at [vendor/magento/framework/Data/Collection/AbstractDb.php:562]
#2 Magento\Framework\Data\Collection\AbstractDb->load() called at [vendor/magento/framework/Data/Collection.php:835]
#3 Magento\Framework\Data\Collection->getIterator() called at [vendor/magefan/module-blog/Model/Config/Source/Author.php:50]
#4 Magefan\Blog\Model\Config\Source\Author->toOptionArray() called at [vendor/magento/module-ui/Component/Form/Element/AbstractOptionsField.php:55]
#5 Magento\Ui\Component\Form\Element\AbstractOptionsField->prepare() called at [vendor/magento/module-ui/Component/AbstractComponent.php:137]
#6 Magento\Ui\Component\AbstractComponent->prepareChildComponent(&Magento\Ui\Component\Form\Element\Select#00000000051103e9000000002c322680#) called at [vendor/magento/module-ui/Component/Form/Field.php:99]
#7 Magento\Ui\Component\Form\Field->prepare() called at [vendor/magento/framework/View/Layout/Generator/UiComponent.php:164]
#8 Magento\Framework\View\Layout\Generator\UiComponent->prepareComponent(&Magento\Ui\Component\Form\Field#000000000511021a000000002c322680#) called at [vendor/magento/framework/View/Layout/Generator/UiComponent.php:161]
#9 Magento\Framework\View\Layout\Generator\UiComponent->prepareComponent(&Magento\Ui\Component\Form\Fieldset#000000000511020e000000002c322680#) called at [vendor/magento/framework/View/Layout/Generator/UiComponent.php:161]
#10 Magento\Framework\View\Layout\Generator\UiComponent->prepareComponent(&Magento\Ui\Component\Form#00000000051102d8000000002c322680#) called at [vendor/magento/framework/View/Layout/Generator/UiComponent.php:142]
#11 Magento\Framework\View\Layout\Generator\UiComponent->generateComponent(&Magento\Framework\View\Layout\Data\Structure#0000000005110946000000002c322680#, 'blog_post_form', array('attributes' => array('group' => '', 'component' => '', 'aclResource' => '', 'visibilityCondit...' => array())), &Magento\Framework\View\Layout\Interceptor#00000000051109d7000000002c322680#) called at [vendor/magento/framework/View/Layout/Generator/UiComponent.php:102]
#12 Magento\Framework\View\Layout\Generator\UiComponent->process(&Magento\Framework\View\Layout\Reader\Context#0000000005110d33000000002c322680#, &Magento\Framework\View\Layout\Generator\Context#0000000005110d1e000000002c322680#) called at [vendor/magento/framework/View/Layout/GeneratorPool.php:81]
#13 Magento\Framework\View\Layout\GeneratorPool->process(&Magento\Framework\View\Layout\Reader\Context#0000000005110d33000000002c322680#, &Magento\Framework\View\Layout\Generator\Context#0000000005110d1e000000002c322680#) called at [vendor/magento/framework/View/Layout.php:343]
#14 Magento\Framework\View\Layout->generateElements() called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:89]
#15 Magento\Framework\View\Layout\Interceptor->generateElements() called at [vendor/magento/framework/View/Layout/Builder.php:129]
#16 Magento\Framework\View\Layout\Builder->generateLayoutBlocks() called at [vendor/magento/framework/View/Page/Builder.php:55]
#17 Magento\Framework\View\Page\Builder->generateLayoutBlocks() called at [vendor/magento/framework/View/Layout/Builder.php:65]
#18 Magento\Framework\View\Layout\Builder->build() called at [vendor/magento/framework/View/Page/Config.php:212]
#19 Magento\Framework\View\Page\Config->build() called at [vendor/magento/framework/View/Page/Config.php:225]
#20 Magento\Framework\View\Page\Config->publicBuild() called at [vendor/magento/framework/App/View.php:170]
#21 Magento\Framework\App\View->loadLayoutUpdates() called at [vendor/magento/framework/App/View.php:114]
#22 Magento\Framework\App\View->loadLayout() called at [vendor/magefan/module-community/Controller/Adminhtml/Actions.php:166]
#23 Magefan\Community\Controller\Adminhtml\Actions->_editAction() called at [vendor/magefan/module-community/Controller/Adminhtml/Actions.php:108]
#24 Magefan\Community\Controller\Adminhtml\Actions->execute() called at [vendor/magento/framework/App/Action/Action.php:108]
#25 Magento\Framework\App\Action\Action->dispatch(&Magento\Framework\App\Request\Http#0000000005110a2c000000002c322680#) called at [vendor/magento/module-backend/App/AbstractAction.php:231]
#26 Magento\Backend\App\AbstractAction->dispatch(&Magento\Framework\App\Request\Http#0000000005110a2c000000002c322680#) called at [vendor/magento/framework/Interception/Interceptor.php:58]
#27 Magefan\Blog\Controller\Adminhtml\Post\Edit\Interceptor->___callParent('dispatch', array(&Magento\Framework\App\Request\Http#0000000005110a2c000000002c322680#)) called at [vendor/magento/framework/Interception/Interceptor.php:138]
#28 Magefan\Blog\Controller\Adminhtml\Post\Edit\Interceptor->Magento\Framework\Interception\{closure}(&Magento\Framework\App\Request\Http#0000000005110a2c000000002c322680#) called at [app/code/WeltPixel/Backend/Plugin/Utility.php:76]
#29 WeltPixel\Backend\Plugin\Utility->aroundDispatch(&Magefan\Blog\Controller\Adminhtml\Post\Edit\Interceptor#000000000511099f000000002c322680#, &Closure#000000000511099d000000002c322680#, &Magento\Framework\App\Request\Http#0000000005110a2c000000002c322680#) called at [vendor/magento/framework/Interception/Interceptor.php:135]
#30 Magefan\Blog\Controller\Adminhtml\Post\Edit\Interceptor->Magento\Framework\Interception\{closure}(&Magento\Framework\App\Request\Http#0000000005110a2c000000002c322680#) called at [app/code/WeltPixel/Backend/Plugin/Utility.php:76]
#31 WeltPixel\Backend\Plugin\Utility->aroundDispatch(&Magefan\Blog\Controller\Adminhtml\Post\Edit\Interceptor#000000000511099f000000002c322680#, &Closure#000000000511099d000000002c322680#, &Magento\Framework\App\Request\Http#0000000005110a2c000000002c322680#) called at [vendor/magento/framework/Interception/Interceptor.php:135]
#32 Magefan\Blog\Controller\Adminhtml\Post\Edit\Interceptor->Magento\Framework\Interception\{closure}(&Magento\Framework\App\Request\Http#0000000005110a2c000000002c322680#) called at [vendor/magento/module-backend/App/Action/Plugin/Authentication.php:143]
#33 Magento\Backend\App\Action\Plugin\Authentication->aroundDispatch(&Magefan\Blog\Controller\Adminhtml\Post\Edit\Interceptor#000000000511099f000000002c322680#, &Closure#000000000511099d000000002c322680#, &Magento\Framework\App\Request\Http#0000000005110a2c000000002c322680#) called at [vendor/magento/framework/Interception/Interceptor.php:135]
#34 Magefan\Blog\Controller\Adminhtml\Post\Edit\Interceptor->Magento\Framework\Interception\{closure}(&Magento\Framework\App\Request\Http#0000000005110a2c000000002c322680#) called at [vendor/magento/framework/Interception/Interceptor.php:153]
#35 Magefan\Blog\Controller\Adminhtml\Post\Edit\Interceptor->___callPlugins('dispatch', array(&Magento\Framework\App\Request\Http#0000000005110a2c000000002c322680#), NULL) called at [generated/code/Magefan/Blog/Controller/Adminhtml/Post/Edit/Interceptor.php:26]
#36 Magefan\Blog\Controller\Adminhtml\Post\Edit\Interceptor->dispatch(&Magento\Framework\App\Request\Http#0000000005110a2c000000002c322680#) called at [vendor/magento/framework/App/FrontController.php:159]
#37 Magento\Framework\App\FrontController->processRequest(&Magento\Framework\App\Request\Http#0000000005110a2c000000002c322680#, &Magefan\Blog\Controller\Adminhtml\Post\Edit\Interceptor#000000000511099f000000002c322680#) called at [vendor/magento/framework/App/FrontController.php:99]
#38 Magento\Framework\App\FrontController->dispatch(&Magento\Framework\App\Request\Http#0000000005110a2c000000002c322680#) called at [vendor/magento/framework/Interception/Interceptor.php:58]
#39 Magento\Framework\App\FrontController\Interceptor->___callParent('dispatch', array(&Magento\Framework\App\Request\Http#0000000005110a2c000000002c322680#)) called at [vendor/magento/framework/Interception/Interceptor.php:138]
#40 Magento\Framework\App\FrontController\Interceptor->Magento\Framework\Interception\{closure}(&Magento\Framework\App\Request\Http#0000000005110a2c000000002c322680#) called at [vendor/magento/framework/Interception/Interceptor.php:153]
#41 Magento\Framework\App\FrontController\Interceptor->___callPlugins('dispatch', array(&Magento\Framework\App\Request\Http#0000000005110a2c000000002c322680#), array(array('default_store_se...', 'page_cache_from_...', 'storeCookieValid...', 'install', 'configHash', 'mstCoreDispatch'))) called at [generated/code/Magento/Framework/App/FrontController/Interceptor.php:26]
#42 Magento\Framework\App\FrontController\Interceptor->dispatch(&Magento\Framework\App\Request\Http#0000000005110a2c000000002c322680#) called at [vendor/magento/framework/App/Http.php:136]
#43 Magento\Framework\App\Http->launch() called at [generated/code/Magento/Framework/App/Http/Interceptor.php:24]
#44 Magento\Framework\App\Http\Interceptor->launch() called at [vendor/magento/framework/App/Bootstrap.php:258]
#45 Magento\Framework\App\Bootstrap->run(&Magento\Framework\App\Http\Interceptor#0000000005110ad2000000002c322680#) called at [index.php:39]
</pre> [] []

Re: Magento 2.3 Admin Panel ID already exists

Have you figured this out??

I have the same issue. Nobody seems to know how to fix this. All the tips i get are run setup:upgrade deploy and usual stuff...

Re: Magento 2.3 Admin Panel ID already exists

I actually have just figured it out after asking you...

It's to do with the authorization_role table


I only have One role in the backend - Admin
And 7 roles for admin users
3 for integrations

For some reason in that table I had like 15 different records....
Deleted everything from there apart from admin and actual user/integration roles

Re: Magento 2.3 Admin Panel ID already exists

it happened to me

when I had created a limited Role then my user was assigned to it. Upps.

Access denied for all

In the database, I made changes to the authorization_rule table. Then Access for All, Good. But this error was displayed and the User List was empty, having records previously.

 

This helped me, it was a duplicate record in authorization_role for one user, removed and now it's working!