0

While migrating my database to a new magento installation, I found this error on my frontend. The backend is working normally.

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

Exception #0 (Exception): Item (Magento\Catalog\Model\Category\Interceptor) with the same ID "626" already exists.
#0 /var/www/aslive/lib/internal/Magento/Framework/Data/Collection/AbstractDb.php(587): Magento\Framework\Data\Collection->addItem(Object(Magento\Catalog\Model\Category\Interceptor))
#1 /var/www/aslive/lib/internal/Magento/Framework/Data/Collection/AbstractDb.php(562): Magento\Framework\Data\Collection\AbstractDb->loadWithFilter(false, false)
#2 /var/www/aslive/lib/internal/Magento/Framework/Data/Collection.php(832): Magento\Framework\Data\Collection\AbstractDb->load()
#3 /var/www/aslive/app/code/Magento/Catalog/Plugin/Block/Topmenu.php(81): Magento\Framework\Data\Collection->getIterator()
#4 /var/www/aslive/lib/internal/Magento/Framework/Interception/Interceptor.php(121): Magento\Catalog\Plugin\Block\Topmenu->beforeGetHtml(Object(Magento\Theme\Block\Html\Topmenu\Interceptor), 'level-top', 'submenu', 0)
#5 /var/www/aslive/lib/internal/Magento/Framework/Interception/Interceptor.php(153): Magento\Theme\Block\Html\Topmenu\Interceptor->Magento\Framework\Interception\{closure}('level-top', 'submenu', 0)
#6 /var/www/aslive/generated/code/Magento/Theme/Block/Html/Topmenu/Interceptor.php(26): Magento\Theme\Block\Html\Topmenu\Interceptor->___callPlugins('getHtml', Array, Array)
#7 /var/www/aslive/app/code/Magento/Theme/view/frontend/templates/html/topmenu.phtml(18): Magento\Theme\Block\Html\Topmenu\Interceptor->getHtml('level-top', 'submenu', 0)
#8 /var/www/aslive/lib/internal/Magento/Framework/View/TemplateEngine/Php.php(59): include('/var/www/aslive...')
#9 /var/www/aslive/lib/internal/Magento/Framework/View/Element/Template.php(271): Magento\Framework\View\TemplateEngine\Php->render(Object(Magento\Theme\Block\Html\Topmenu\Interceptor), '/var/www/aslive...', Array)
#10 /var/www/aslive/generated/code/Magento/Theme/Block/Html/Topmenu/Interceptor.php(167): Magento\Framework\View\Element\Template->fetchView('/var/www/aslive...')
#11 /var/www/aslive/lib/internal/Magento/Framework/View/Element/Template.php(301): Magento\Theme\Block\Html\Topmenu\Interceptor->fetchView('/var/www/aslive...')
#12 /var/www/aslive/lib/internal/Magento/Framework/View/Element/AbstractBlock.php(668): Magento\Framework\View\Element\Template->_toHtml()
#13 /var/www/aslive/generated/code/Magento/Theme/Block/Html/Topmenu/Interceptor.php(479): Magento\Framework\View\Element\AbstractBlock->toHtml()
#14 /var/www/aslive/lib/internal/Magento/Framework/View/Layout.php(557): Magento\Theme\Block\Html\Topmenu\Interceptor->toHtml()
#15 /var/www/aslive/lib/internal/Magento/Framework/View/Layout.php(533): Magento\Framework\View\Layout->_renderBlock('catalog.topnav')
#16 /var/www/aslive/generated/code/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('catalog.topnav')
#17 /var/www/aslive/lib/internal/Magento/Framework/View/Layout.php(488): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('catalog.topnav')
#18 /var/www/aslive/generated/code/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('catalog.topnav', true)
#19 /var/www/aslive/lib/internal/Magento/Framework/View/Element/AbstractBlock.php(512): Magento\Framework\View\Layout\Interceptor->renderElement('catalog.topnav', true)
#20 /var/www/aslive/app/code/Magento/Theme/view/frontend/templates/html/container.phtml(10): Magento\Framework\View\Element\AbstractBlock->getChildHtml()
#21 /var/www/aslive/lib/internal/Magento/Framework/View/TemplateEngine/Php.php(59): include('/var/www/aslive...')
#22 /var/www/aslive/lib/internal/Magento/Framework/View/Element/Template.php(271): Magento\Framework\View\TemplateEngine\Php->render(Object(Magento\Framework\View\Element\Template), '/var/www/aslive...', Array)
#23 /var/www/aslive/lib/internal/Magento/Framework/View/Element/Template.php(301): Magento\Framework\View\Element\Template->fetchView('/var/www/aslive...')
#24 /var/www/aslive/lib/internal/Magento/Framework/View/Element/AbstractBlock.php(668): Magento\Framework\View\Element\Template->_toHtml()
#25 /var/www/aslive/lib/internal/Magento/Framework/View/Layout.php(557): Magento\Framework\View\Element\AbstractBlock->toHtml()
#26 /var/www/aslive/lib/internal/Magento/Framework/View/Layout.php(533): Magento\Framework\View\Layout->_renderBlock('store.menu')
#27 /var/www/aslive/generated/code/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('store.menu')
#28 /var/www/aslive/lib/internal/Magento/Framework/View/Layout.php(488): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('store.menu')
#29 /var/www/aslive/generated/code/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('store.menu', true)
#30 /var/www/aslive/app/code/Magento/Theme/view/frontend/templates/html/sections.phtml(26): Magento\Framework\View\Layout\Interceptor->renderElement('store.menu')
#31 /var/www/aslive/lib/internal/Magento/Framework/View/TemplateEngine/Php.php(59): include('/var/www/aslive...')
#32 /var/www/aslive/lib/internal/Magento/Framework/View/Element/Template.php(271): Magento\Framework\View\TemplateEngine\Php->render(Object(Magento\Framework\View\Element\Template), '/var/www/aslive...', Array)
#33 /var/www/aslive/lib/internal/Magento/Framework/View/Element/Template.php(301): Magento\Framework\View\Element\Template->fetchView('/var/www/aslive...')
#34 /var/www/aslive/lib/internal/Magento/Framework/View/Element/AbstractBlock.php(668): Magento\Framework\View\Element\Template->_toHtml()
#35 /var/www/aslive/lib/internal/Magento/Framework/View/Layout.php(557): Magento\Framework\View\Element\AbstractBlock->toHtml()
#36 /var/www/aslive/lib/internal/Magento/Framework/View/Layout.php(533): Magento\Framework\View\Layout->_renderBlock('navigation.sect...')
#37 /var/www/aslive/generated/code/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('navigation.sect...')
#38 /var/www/aslive/lib/internal/Magento/Framework/View/Layout.php(488): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('navigation.sect...')
#39 /var/www/aslive/generated/code/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('navigation.sect...', false)
#40 /var/www/aslive/lib/internal/Magento/Framework/View/Layout.php(585): Magento\Framework\View\Layout\Interceptor->renderElement('navigation.sect...', false)
#41 /var/www/aslive/lib/internal/Magento/Framework/View/Layout.php(535): Magento\Framework\View\Layout->_renderContainer('page.top', false)
#42 /var/www/aslive/generated/code/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('page.top')
#43 /var/www/aslive/lib/internal/Magento/Framework/View/Layout.php(488): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('page.top')
#44 /var/www/aslive/generated/code/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('page.top', false)
#45 /var/www/aslive/lib/internal/Magento/Framework/View/Layout.php(585): Magento\Framework\View\Layout\Interceptor->renderElement('page.top', false)
#46 /var/www/aslive/lib/internal/Magento/Framework/View/Layout.php(535): Magento\Framework\View\Layout->_renderContainer('page.wrapper', false)
#47 /var/www/aslive/generated/code/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('page.wrapper')
#48 /var/www/aslive/lib/internal/Magento/Framework/View/Layout.php(488): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('page.wrapper')
#49 /var/www/aslive/generated/code/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('page.wrapper', false)
#50 /var/www/aslive/lib/internal/Magento/Framework/View/Layout.php(585): Magento\Framework\View\Layout\Interceptor->renderElement('page.wrapper', false)
#51 /var/www/aslive/lib/internal/Magento/Framework/View/Layout.php(535): Magento\Framework\View\Layout->_renderContainer('root', false)
#52 /var/www/aslive/generated/code/Magento/Framework/View/Layout/Interceptor.php(206): Magento\Framework\View\Layout->renderNonCachedElement('root')
#53 /var/www/aslive/lib/internal/Magento/Framework/View/Layout.php(488): Magento\Framework\View\Layout\Interceptor->renderNonCachedElement('root')
#54 /var/www/aslive/generated/code/Magento/Framework/View/Layout/Interceptor.php(193): Magento\Framework\View\Layout->renderElement('root', true)
#55 /var/www/aslive/lib/internal/Magento/Framework/View/Layout.php(954): Magento\Framework\View\Layout\Interceptor->renderElement('root')
#56 /var/www/aslive/lib/internal/Magento/Framework/Interception/Interceptor.php(58): Magento\Framework\View\Layout->getOutput()
#57 /var/www/aslive/lib/internal/Magento/Framework/Interception/Interceptor.php(138): Magento\Framework\View\Layout\Interceptor->___callParent('getOutput', Array)
#58 /var/www/aslive/lib/internal/Magento/Framework/Interception/Interceptor.php(153): Magento\Framework\View\Layout\Interceptor->Magento\Framework\Interception\{closure}()
#59 /var/www/aslive/generated/code/Magento/Framework/View/Layout/Interceptor.php(494): Magento\Framework\View\Layout\Interceptor->___callPlugins('getOutput', Array, Array)
#60 /var/www/aslive/lib/internal/Magento/Framework/View/Result/Page.php(258): Magento\Framework\View\Layout\Interceptor->getOutput()
#61 /var/www/aslive/lib/internal/Magento/Framework/View/Result/Layout.php(171): Magento\Framework\View\Result\Page->render(Object(Magento\Framework\App\Response\Http\Interceptor))
#62 /var/www/aslive/lib/internal/Magento/Framework/Interception/Interceptor.php(58): Magento\Framework\View\Result\Layout->renderResult(Object(Magento\Framework\App\Response\Http\Interceptor))
#63 /var/www/aslive/lib/internal/Magento/Framework/Interception/Interceptor.php(138): Magento\Framework\View\Result\Page\Interceptor->___callParent('renderResult', Array)
#64 /var/www/aslive/lib/internal/Magento/Framework/Interception/Interceptor.php(153): Magento\Framework\View\Result\Page\Interceptor->Magento\Framework\Interception\{closure}(Object(Magento\Framework\App\Response\Http\Interceptor))
#65 /var/www/aslive/generated/code/Magento/Framework/View/Result/Page/Interceptor.php(130): Magento\Framework\View\Result\Page\Interceptor->___callPlugins('renderResult', Array, Array)
#66 /var/www/aslive/lib/internal/Magento/Framework/App/Http.php(139): Magento\Framework\View\Result\Page\Interceptor->renderResult(Object(Magento\Framework\App\Response\Http\Interceptor))
#67 /var/www/aslive/generated/code/Magento/Framework/App/Http/Interceptor.php(24): Magento\Framework\App\Http->launch()
#68 /var/www/aslive/lib/internal/Magento/Framework/App/Bootstrap.php(258): Magento\Framework\App\Http\Interceptor->launch()
#69 /var/www/aslive/pub/index.php(37): Magento\Framework\App\Bootstrap->run(Object(Magento\Framework\App\Http\Interceptor))
#70 {main}`
  • I had a similar problem a while ago and if I recall correctly I literally had to go to the DB and manually delete the duplicated entries. Try running this query SELECT * FROM catalog_category_entity WHERE entity_id = 626; on your DB and see if you get multiple results. If so, make a backup of your database and then try deleting one of the records. Sadly I have no idea what causes this. – Zankar Mar 4 at 12:21
0

It means that your category with ID 626 already exists in the database and therefor is trying load it twice. I would search your catalog_category_entity table for the ID 626 and remove any duplicates. More research would be required since this can also mean some values in other category tables exists twice for the same storefront.

0

login in admin panel and goto catalog > categories and check all categories id ( Bottoms (ID: 10) ). May be ID 626 will show twice, then delete one category whose id is 626.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.