cancel
Showing results for 
Search instead for 
Did you mean: 

Error Interceptor) with the same ID "53" already exists

Error Interceptor) with the same ID "53" already exists

Hello, 

today, while we were working in admin catalog pages, the web site has crashed.

Could anyone help me please?

Thank you a lot in advance

Following the log error:

 

1 exception(s):
Exception #0 (Exception): Item (Magento\Catalog\Model\Category\Interceptor) with the same ID "53" already exists.

Exception #0 (Exception): Item (Magento\Catalog\Model\Category\Interceptor) with the same ID "53" already exists.
<pre>#1 Magento\Eav\Model\Entity\Collection\AbstractCollection->addItem(&Magento\Catalog\Model\Category\Interceptor#00000000312dedc000000000185ed897#) called at [vendor/magento/module-eav/Model/Entity/Collection/AbstractCollection.php:1138]
#2 Magento\Eav\Model\Entity\Collection\AbstractCollection->_loadEntities(false, false) called at [vendor/magento/module-eav/Model/Entity/Collection/AbstractCollection.php:927]
#3 Magento\Eav\Model\Entity\Collection\AbstractCollection->load(false, false) called at [vendor/magento/module-catalog/Model/ResourceModel/Category/Collection.php:234]
#4 Magento\Catalog\Model\ResourceModel\Category\Collection->load() called at [vendor/magento/framework/Data/Collection.php:824]
#5 Magento\Framework\Data\Collection->getItemById(45) called at [vendor/swissup/module-navigationpro/Model/ResourceModel/Item/Collection.php:302]
#6 Swissup\Navigationpro\Model\ResourceModel\Item\Collection->addRemoteEntitiesToResult() called at [vendor/swissup/module-navigationpro/Model/ResourceModel/Item/Collection.php:194]
#7 Swissup\Navigationpro\Model\ResourceModel\Item\Collection->_afterLoad() called at [vendor/magento/framework/Data/Collection/AbstractDb.php:594]
#8 Magento\Framework\Data\Collection\AbstractDb->loadWithFilter(false, false) called at [vendor/magento/framework/Data/Collection/AbstractDb.php:565]
#9 Magento\Framework\Data\Collection\AbstractDb->load() called at [vendor/magento/framework/Data/Collection.php:300]
#10 Magento\Framework\Data\Collection->getFirstItem() called at [vendor/swissup/module-navigationpro/Observer/PrepareMenuItems.php:72]
#11 Swissup\Navigationpro\Observer\PrepareMenuItems->execute(&Magento\Framework\Event\Observer#00000000312dec7500000000185ed897#) called at [vendor/magento/framework/Event/Invoker/InvokerDefault.php:88]
#12 Magento\Framework\Event\Invoker\InvokerDefault->_callObserverMethod(&Swissup\Navigationpro\Observer\PrepareMenuItems#00000000312dec5e00000000185ed897#, &Magento\Framework\Event\Observer#00000000312dec7500000000185ed897#) called at [vendor/magento/framework/Event/Invoker/InvokerDefault.php:74]
#13 Magento\Framework\Event\Invoker\InvokerDefault->dispatch(array('instance' => 'Swissup\Navigati...', 'name' => 'swissup_navigati...'), &Magento\Framework\Event\Observer#00000000312dec7500000000185ed897#) called at [vendor/magento/framework/Event/Manager.php:66]
#14 Magento\Framework\Event\Manager->dispatch('swissup_navigati...', array('menu' => &Magento\Framework\Data\Tree\Node#00000000312dec7b00000000185ed897#, 'block' => &Swissup\Navigationpro\Block\Menu\Interceptor#00000000312de4be00000000185ed897#, 'request' => &Magento\Framework\App\Request\Http#00000000312de1fb00000000185ed897#)) called at [generated/code/Magento/Framework/Event/Manager/Proxy.php:95]
#15 Magento\Framework\Event\Manager\Proxy->dispatch('swissup_navigati...', array('menu' => &Magento\Framework\Data\Tree\Node#00000000312dec7b00000000185ed897#, 'block' => &Swissup\Navigationpro\Block\Menu\Interceptor#00000000312de4be00000000185ed897#, 'request' => &Magento\Framework\App\Request\Http#00000000312de1fb00000000185ed897#)) called at [vendor/swissup/module-navigationpro/Block/Menu.php:893]
#16 Swissup\Navigationpro\Block\Menu->getMenuTree() called at [generated/code/Swissup/Navigationpro/Block/Menu/Interceptor.php:128]
#17 Swissup\Navigationpro\Block\Menu\Interceptor->getMenuTree() called at [vendor/swissup/module-navigationpro/Block/Menu.php:382]
#18 Swissup\Navigationpro\Block\Menu->getHtml('level-top') called at [generated/code/Swissup/Navigationpro/Block/Menu/Interceptor.php:115]
#19 Swissup\Navigationpro\Block\Menu\Interceptor->getHtml('level-top') called at [vendor/swissup/module-navigationpro/view/frontend/templates/menu.phtml:2]
#20 include('/storage/wwwroot...') called at [vendor/magento/framework/View/TemplateEngine/Php.php:59]
#21 Magento\Framework\View\TemplateEngine\Php->render(&Swissup\Navigationpro\Block\Menu\Interceptor#00000000312de4be00000000185ed897#, '/storage/wwwroot...', array()) called at [vendor/magento/framework/View/Element/Template.php:271]
#22 Magento\Framework\View\Element\Template->fetchView('/storage/wwwroot...') called at [generated/code/Swissup/Navigationpro/Block/Menu/Interceptor.php:258]
#23 Swissup\Navigationpro\Block\Menu\Interceptor->fetchView('/storage/wwwroot...') called at [vendor/magento/framework/View/Element/Template.php:301]
#24 Magento\Framework\View\Element\Template->_toHtml() called at [vendor/magento/framework/View/Element/AbstractBlock.php:1097]
#25 Magento\Framework\View\Element\AbstractBlock->Magento\Framework\View\Element\{closure}() called at [vendor/magento/framework/Cache/LockGuardedCacheLoader.php:79]
#26 Magento\Framework\Cache\LockGuardedCacheLoader->lockedLoadData('BLOCK_a44b820e66...', &Closure#00000000312dec3d00000000185ed897#, &Closure#00000000312dec3400000000185ed897#, &Closure#00000000312dec3f00000000185ed897#) called at [vendor/magento/framework/View/Element/AbstractBlock.php:1133]
#27 Magento\Framework\View\Element\AbstractBlock->_loadCache() called at [vendor/magento/framework/View/Element/AbstractBlock.php:671]
#28 Magento\Framework\View\Element\AbstractBlock->toHtml() called at [generated/code/Swissup/Navigationpro/Block/Menu/Interceptor.php:570]
#29 Swissup\Navigationpro\Block\Menu\Interceptor->toHtml() called at [vendor/magento/framework/View/Layout.php:557]
#30 Magento\Framework\View\Layout->_renderBlock('navpro.topnav') called at [vendor/magento/framework/View/Layout.php:533]
#31 Magento\Framework\View\Layout->renderNonCachedElement('navpro.topnav') called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:206]
#32 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('navpro.topnav') called at [vendor/magento/framework/View/Layout.php:488]
#33 Magento\Framework\View\Layout->renderElement('navpro.topnav', true) called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:193]
#34 Magento\Framework\View\Layout\Interceptor->renderElement('navpro.topnav', true) called at [vendor/magento/framework/View/Element/AbstractBlock.php:522]
#35 Magento\Framework\View\Element\AbstractBlock->getChildHtml('', true) called at [generated/code/Magento/Framework/View/Element/Template/Interceptor.php:336]
#36 Magento\Framework\View\Element\Template\Interceptor->getChildHtml() called at [vendor/magento/module-theme/view/frontend/templates/html/container.phtml:7]
#37 include('/storage/wwwroot...') called at [vendor/magento/framework/View/TemplateEngine/Php.php:59]
#38 Magento\Framework\View\TemplateEngine\Php->render(&Magento\Framework\View\Element\Template\Interceptor#00000000312de58100000000185ed897#, '/storage/wwwroot...', array()) called at [vendor/magento/framework/View/Element/Template.php:271]
#39 Magento\Framework\View\Element\Template->fetchView('/storage/wwwroot...') called at [generated/code/Magento/Framework/View/Element/Template/Interceptor.php:102]
#40 Magento\Framework\View\Element\Template\Interceptor->fetchView('/storage/wwwroot...') called at [vendor/magento/framework/View/Element/Template.php:301]
#41 Magento\Framework\View\Element\Template->_toHtml() called at [vendor/magento/framework/View/Element/AbstractBlock.php:1097]
#42 Magento\Framework\View\Element\AbstractBlock->Magento\Framework\View\Element\{closure}() called at [vendor/magento/framework/View/Element/AbstractBlock.php:1101]
#43 Magento\Framework\View\Element\AbstractBlock->_loadCache() called at [vendor/magento/framework/View/Element/AbstractBlock.php:671]
#44 Magento\Framework\View\Element\AbstractBlock->toHtml() called at [generated/code/Magento/Framework/View/Element/Template/Interceptor.php:427]
#45 Magento\Framework\View\Element\Template\Interceptor->toHtml() called at [vendor/magento/framework/View/Layout.php:557]
#46 Magento\Framework\View\Layout->_renderBlock('store.menu') called at [vendor/magento/framework/View/Layout.php:533]
#47 Magento\Framework\View\Layout->renderNonCachedElement('store.menu') called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:206]
#48 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('store.menu') called at [vendor/magento/framework/View/Layout.php:488]
#49 Magento\Framework\View\Layout->renderElement('store.menu', true) called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:193]
#50 Magento\Framework\View\Layout\Interceptor->renderElement('store.menu') called at [vendor/magento/module-theme/view/frontend/templates/html/sections.phtml:22]
#51 include('/storage/wwwroot...') called at [vendor/magento/framework/View/TemplateEngine/Php.php:59]
#52 Magento\Framework\View\TemplateEngine\Php->render(&Magento\Framework\View\Element\Template\Interceptor#00000000312de5a400000000185ed897#, '/storage/wwwroot...', array()) called at [vendor/magento/framework/View/Element/Template.php:271]
#53 Magento\Framework\View\Element\Template->fetchView('/storage/wwwroot...') called at [generated/code/Magento/Framework/View/Element/Template/Interceptor.php:102]
#54 Magento\Framework\View\Element\Template\Interceptor->fetchView('/storage/wwwroot...') called at [vendor/magento/framework/View/Element/Template.php:301]
#55 Magento\Framework\View\Element\Template->_toHtml() called at [vendor/magento/framework/View/Element/AbstractBlock.php:1097]
#56 Magento\Framework\View\Element\AbstractBlock->Magento\Framework\View\Element\{closure}() called at [vendor/magento/framework/View/Element/AbstractBlock.php:1101]
#57 Magento\Framework\View\Element\AbstractBlock->_loadCache() called at [vendor/magento/framework/View/Element/AbstractBlock.php:671]
#58 Magento\Framework\View\Element\AbstractBlock->toHtml() called at [generated/code/Magento/Framework/View/Element/Template/Interceptor.php:427]
#59 Magento\Framework\View\Element\Template\Interceptor->toHtml() called at [vendor/magento/framework/View/Layout.php:557]
#60 Magento\Framework\View\Layout->_renderBlock('navigation.secti...') called at [vendor/magento/framework/View/Layout.php:533]
#61 Magento\Framework\View\Layout->renderNonCachedElement('navigation.secti...') called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:206]
#62 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('navigation.secti...') called at [vendor/magento/framework/View/Layout.php:488]
#63 Magento\Framework\View\Layout->renderElement('navigation.secti...', false) called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:193]
#64 Magento\Framework\View\Layout\Interceptor->renderElement('navigation.secti...', false) called at [vendor/magento/framework/View/Layout.php:585]
#65 Magento\Framework\View\Layout->_renderContainer('page.top', false) called at [vendor/magento/framework/View/Layout.php:535]
#66 Magento\Framework\View\Layout->renderNonCachedElement('page.top') called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:206]
#67 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('page.top') called at [vendor/magento/framework/View/Layout.php:488]
#68 Magento\Framework\View\Layout->renderElement('page.top', false) called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:193]
#69 Magento\Framework\View\Layout\Interceptor->renderElement('page.top', false) called at [vendor/magento/framework/View/Layout.php:585]
#70 Magento\Framework\View\Layout->_renderContainer('page.wrapper', false) called at [vendor/magento/framework/View/Layout.php:535]
#71 Magento\Framework\View\Layout->renderNonCachedElement('page.wrapper') called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:206]
#72 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('page.wrapper') called at [vendor/magento/framework/View/Layout.php:488]
#73 Magento\Framework\View\Layout->renderElement('page.wrapper', false) called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:193]
#74 Magento\Framework\View\Layout\Interceptor->renderElement('page.wrapper', false) called at [vendor/magento/framework/View/Layout.php:585]
#75 Magento\Framework\View\Layout->_renderContainer('root', false) called at [vendor/magento/framework/View/Layout.php:535]
#76 Magento\Framework\View\Layout->renderNonCachedElement('root') called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:206]
#77 Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('root') called at [vendor/magento/framework/View/Layout.php:488]
#78 Magento\Framework\View\Layout->renderElement('root', true) called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:193]
#79 Magento\Framework\View\Layout\Interceptor->renderElement('root') called at [vendor/magento/framework/View/Layout.php:954]
#80 Magento\Framework\View\Layout->getOutput() called at [vendor/magento/framework/Interception/Interceptor.php:58]
#81 Magento\Framework\View\Layout\Interceptor->___callParent('getOutput', array()) called at [vendor/magento/framework/Interception/Interceptor.php:138]
#82 Magento\Framework\View\Layout\Interceptor->Magento\Framework\Interception\{closure}() called at [vendor/magento/framework/Interception/Interceptor.php:153]
#83 Magento\Framework\View\Layout\Interceptor->___callPlugins('getOutput', array(), array(array('layout-model-cac...'))) called at [generated/code/Magento/Framework/View/Layout/Interceptor.php:494]
#84 Magento\Framework\View\Layout\Interceptor->getOutput() called at [vendor/magento/framework/View/Result/Page.php:258]
#85 Magento\Framework\View\Result\Page->render(&Magento\Framework\App\Response\Http\Interceptor#00000000312de18000000000185ed897#) called at [vendor/magento/framework/View/Result/Layout.php:171]
#86 Magento\Framework\View\Result\Layout->renderResult(&Magento\Framework\App\Response\Http\Interceptor#00000000312de18000000000185ed897#) called at [vendor/magento/framework/Interception/Interceptor.php:58]
#87 Magento\Framework\View\Result\Page\Interceptor->___callParent('renderResult', array(&Magento\Framework\App\Response\Http\Interceptor#00000000312de18000000000185ed897#)) called at [vendor/magento/framework/Interception/Interceptor.php:138]
#88 Magento\Framework\View\Result\Page\Interceptor->Magento\Framework\Interception\{closure}(&Magento\Framework\App\Response\Http\Interceptor#00000000312de18000000000185ed897#) called at [vendor/swissup/module-amp/Plugin/Framework/ViewResultPage.php:66]
#89 Swissup\Amp\Plugin\Framework\ViewResultPage->aroundRenderResult(&Magento\Framework\View\Result\Page\Interceptor#00000000312de50700000000185ed897#, &Closure#00000000312de08600000000185ed897#, &Magento\Framework\App\Response\Http\Interceptor#00000000312de18000000000185ed897#) called at [vendor/magento/framework/Interception/Interceptor.php:135]
#90 Magento\Framework\View\Result\Page\Interceptor->Magento\Framework\Interception\{closure}(&Magento\Framework\App\Response\Http\Interceptor#00000000312de18000000000185ed897#) called at [vendor/magento/framework/Interception/Interceptor.php:153]
#91 Magento\Framework\View\Result\Page\Interceptor->___callPlugins('renderResult', array(&Magento\Framework\App\Response\Http\Interceptor#00000000312de18000000000185ed897#), array(array('result-optimiser...', 'result-messages', 'result-builtin-c...', 'result-varnish-c...'))) called at [generated/code/Magento/Framework/View/Result/Page/Interceptor.php:130]
#92 Magento\Framework\View\Result\Page\Interceptor->renderResult(&Magento\Framework\App\Response\Http\Interceptor#00000000312de18000000000185ed897#) called at [vendor/magento/framework/App/Http.php:141]
#93 Magento\Framework\App\Http->launch() called at [generated/code/Magento/Framework/App/Http/Interceptor.php:24]
#94 Magento\Framework\App\Http\Interceptor->launch() called at [vendor/magento/framework/App/Bootstrap.php:261]
#95 Magento\Framework\App\Bootstrap->run(&Magento\Framework\App\Http\Interceptor#00000000312de18900000000185ed897#) called at [index.php:39]
</pre>
9 REPLIES 9

Re: Error Interceptor) with the same ID "53" already exists

@filaverse 

 

It seems you delete any products but its id still exits in some table so its throwing this error:

 

I found this as someone facing same error you can try to check in database or try to check by running this query in db:

 

SELECT * FROM cataloginventory_stock_item
WHERE product_id in (
    SELECT product_id 
    FROM cataloginventory_stock_item
    GROUP BY product_id
    HAVING ( COUNT(product_id) > 1 )
)

Delete if there any duplicate entry. 

 

Or search in database catalog table if you can find id=53 any entry and that related to which table.  

Manish Mittal
https://www.manishmittal.com/

Re: Error Interceptor) with the same ID "53" already exists

Hi @filaverse ,

 

From the stack trace it seems like you are using one third party module of Swissup_NavigationPro 

1. Try to disable this module first and crosscheck whether this module is compatible with your magento version or not.

 

Hope this helps you!

Problem Solved! Click Kudos & Accept as Solution!

Re: Error Interceptor) with the same ID "53" already exists

Hi, thank you for your reply. 

I checked and thare isn't any product with duplicate id. The first id is 69.

in db there are a lot of table related with product. could you give me any sudgest where to begin the manual research?

Re: Error Interceptor) with the same ID "53" already exists

@Nishu Jindal 

Thank you for your reply, i checked and Swissup_NavigationPro is compatible with the version of my magento 2.3.3

 

In my previuos post i forgot to specify that the admin area is still working and i can navigate even in navigation pro admin area .

 

 

thank you for any support.

Valerio

Re: Error Interceptor) with the same ID "53" already exists

Hello @filaverse 

 

Have you ran shared query? what is the result for shared query? 

Manish Mittal
https://www.manishmittal.com/

Re: Error Interceptor) with the same ID "53" already exists

@Manish Mittal i'm sorry for my late reply.

I'm new, can you expplain me what's shared query?

Re: Error Interceptor) with the same ID "53" already exists

Hello,

 

SELECT * FROM cataloginventory_stock_item
WHERE product_id in (
    SELECT product_id 
    FROM cataloginventory_stock_item
    GROUP BY product_id
    HAVING ( COUNT(product_id) > 1 )
)
Manish Mittal
https://www.manishmittal.com/

Re: Error Interceptor) with the same ID "53" already exists

oh, it was very simple. yes i ran the shared query and i got no records as result.

there isn't any dupplicate record.

Re: Error Interceptor) with the same ID "53" already exists

I found this was down to the duplicate url rewrites in the url_rewrite table.

First thing I did was check if I had any 301s set for categories that weren't set as false for is_autogenerated:

 

SELECT * FROM `url_rewrite` WHERE `entity_type` = 'category' AND `redirect_type` = 301 AND `is_autogenerated` = 1;

If that produced any results, I removed them:

 

 

UPDATE `url_rewrite` SET `is_autogenerated` = 0 WHERE `entity_type` = 'category' AND `redirect_type` = 301 AND `is_autogenerated` = 1;

Then I ran a check for duplicate records:

 

 

SELECT entity_id, target_path, store_id, COUNT(*) AS quantity FROM `url_rewrite` WHERE `target_path` REGEXP '^catalog/category/view/id/[0-9]+$' AND `redirect_type` = 0 AND `is_autogenerated` = 1 AND `entity_type` = 'category' GROUP BY entity_id, target_path, store_id HAVING COUNT(*) > 1;

So for example if I had
request_path       - target_path                                 - redirect_type - is_autogenerated
blahblaf/abc1      - catalog/category/view/id/1234   - 0                    - 1

blahblaf/abc2      - catalog/category/view/id/1234   - 0                    - 1

Then I'd make one of them records be a 301 to the other one.

This resolved the issue for me.