0

My background: I'm an absolute novice when it comes Magento, although quite familiar with PHP/MySQL. I work for a hosting company in technical support now.

Problem: I just transferred a large Magento 1.8.1.0 site from one server to another. Following the move, whenever a customer logs in they get the following error:

Item (Webtex_CustomerGroupsPrice_Model_Catalog_Product) with the same id "1518" already exist

Trace:
#0 /home/thecarat/public_html/app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php(265): Varien_Data_Collection->addItem(Object(Webtex_CustomerGroupsPrice_Model_Catalog_Product))
#1 /home/thecarat/public_html/app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php(1057): Mage_Eav_Model_Entity_Collection_Abstract->addItem(Object(Webtex_CustomerGroupsPrice_Model_Catalog_Product))
#2 /home/thecarat/public_html/app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php(871): Mage_Eav_Model_Entity_Collection_Abstract->_loadEntities(false, false)
#3 /home/thecarat/public_html/app/code/core/Mage/Catalog/Helper/Product/Compare.php(214): Mage_Eav_Model_Entity_Collection_Abstract->load()
#4 /home/thecarat/public_html/app/design/frontend/base/default/template/catalog/product/compare/sidebar.phtml(30): Mage_Catalog_Helper_Product_Compare->getItemCollection()
#5 /home/thecarat/public_html/app/code/core/Mage/Core/Block/Template.php(241): include('/home/thecarat/...')
#6 /home/thecarat/public_html/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('frontend/base/d...')
#7 /home/thecarat/public_html/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#8 /home/thecarat/public_html/app/code/core/Mage/Core/Block/Abstract.php(919): Mage_Core_Block_Template->_toHtml()
#9 /home/thecarat/public_html/app/code/core/Mage/Core/Block/Text/List.php(43): Mage_Core_Block_Abstract->toHtml()
#10 /home/thecarat/public_html/app/code/core/Mage/Core/Block/Abstract.php(919): Mage_Core_Block_Text_List->_toHtml()
#11 /home/thecarat/public_html/app/code/core/Mage/Core/Block/Abstract.php(637): Mage_Core_Block_Abstract->toHtml()
#12 /home/thecarat/public_html/app/code/core/Mage/Core/Block/Abstract.php(581): Mage_Core_Block_Abstract->_getChildHtml('left', true)
#13 /home/thecarat/public_html/app/design/frontend/mercado/default/template/page/2columns-left.phtml(27): Mage_Core_Block_Abstract->getChildHtml('left')
#14 /home/thecarat/public_html/app/code/core/Mage/Core/Block/Template.php(241): include('/home/thecarat/...')
#15 /home/thecarat/public_html/app/code/core/Mage/Core/Block/Template.php(272): Mage_Core_Block_Template->fetchView('frontend/mercad...')
#16 /home/thecarat/public_html/app/code/core/Mage/Core/Block/Template.php(286): Mage_Core_Block_Template->renderView()
#17 /home/thecarat/public_html/app/code/core/Mage/Core/Block/Abstract.php(919): Mage_Core_Block_Template->_toHtml()
#18 /home/thecarat/public_html/app/code/core/Mage/Core/Model/Layout.php(555): Mage_Core_Block_Abstract->toHtml()
#19 /home/thecarat/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(390): Mage_Core_Model_Layout->getOutput()
#20 /home/thecarat/public_html/app/code/core/Mage/Customer/controllers/AccountController.php(115): Mage_Core_Controller_Varien_Action->renderLayout()
#21 /home/thecarat/public_html/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Customer_AccountController->indexAction()
#22 /home/thecarat/public_html/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(250): Mage_Core_Controller_Varien_Action->dispatch('index')
#23 /home/thecarat/public_html/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#24 /home/thecarat/public_html/app/code/core/Mage/Core/Model/App.php(354): Mage_Core_Controller_Varien_Front->dispatch()
#25 /home/thecarat/public_html/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#26 /home/thecarat/public_html/index.php(87): Mage::run('wholesale', 'store')
#27 {main}

I've found similar errors reported online but the solutions don't seem to apply to this case.

Apparently there have been no changes made from an admin point of view since the server move. I can confirm it does still work OK on the old server. I took a fresh backup of the database and tried that but still no luck.

Any ideas welcome as I'm pretty much stuck on this. Thanks

0

Please try below query for your table in which you get a duplicate error.

SELECT customer_id, product_id, count(*) as duplicate 
 FROM catalog_compare_item 
 GROUP BY customer_id, product_id HAVING count(*)> 1

Above query return duplication entry from catalog_compare_item table by match value in customer_id and product_id column. It shows one user and product duplication. After removing duplication run SQL query again for find next duplicate entry. enter image description here

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.