宇讯一资源

Magento (Item (Mage_Catalog_Model_Product) with the same id “nnnnnn” already exist)

发布于2020年05月12日 | 暂无评论 | 96阅读 | magento

a:5:{i:0;s:70:"Item (Mage_Catalog_Model_Product) with the same id "945" already exist";i:1;s:2897:"#0 /www/wwwroot/www/app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php(265): Varien_Data_Collection->addItem(Object(Mage_Catalog_Model_Product))
#1 /www/wwwroot/www/app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php(1055): Mage_Eav_Model_Entity_Collection_Abstract->addItem(Object(Mage_Catalog_Model_Product))
#2 /www/wwwroot/www/app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php(871): Mage_Eav_Model_Entity_Collection_Abstract->_loadEntities(false, false)
#3 /www/wwwroot/www/app/code/local/Sm/Deal/Block/List.php(35): Mage_Eav_Model_Entity_Collection_Abstract->load()
#4 /www/wwwroot/www/app/code/core/Mage/Core/Block/Abstract.php(293): Sm_Deal_Block_List->_prepareLayout()
#5 /www/wwwroot/www/app/code/core/Mage/Core/Model/Layout.php(456): Mage_Core_Block_Abstract->setLayout(Object(Mage_Core_Model_Layout))
#6 /www/wwwroot/www/app/code/core/Mage/Core/Model/Layout.php(472): Mage_Core_Model_Layout->createBlock('deal/List', 'deal')
#7 /www/wwwroot/www/app/code/core/Mage/Core/Model/Layout.php(239): Mage_Core_Model_Layout->addBlock('deal/List', 'deal')
#8 /www/wwwroot/www/app/code/core/Mage/Core/Model/Layout.php(205): Mage_Core_Model_Layout->_generateBlock(Object(Mage_Core_Model_Layout_Element), Object(Mage_Core_Model_Layout_Element))
#9 /www/wwwroot/www/app/code/core/Mage/Core/Model/Layout.php(206): Mage_Core_Model_Layout->generateBlocks(Object(Mage_Core_Model_Layout_Element))
#10 /www/wwwroot/www/app/code/core/Mage/Core/Controller/Varien/Action.php(344): Mage_Core_Model_Layout->generateBlocks()
#11 /www/wwwroot/www/app/code/core/Mage/Cms/Helper/Page.php(113): Mage_Core_Controller_Varien_Action->generateLayoutBlocks()
#12 /www/wwwroot/www/app/code/core/Mage/Cms/Helper/Page.php(52): Mage_Cms_Helper_Page->_renderPage(Object(Mage_Cms_IndexController), 'home-left')
#13 /www/wwwroot/www/app/code/core/Mage/Cms/controllers/IndexController.php(45): Mage_Cms_Helper_Page->renderPage(Object(Mage_Cms_IndexController), 'home-left')
#14 /www/wwwroot/www/app/code/core/Mage/Core/Controller/Varien/Action.php(418): Mage_Cms_IndexController->indexAction()
#15 /www/wwwroot/www/app/code/core/Mage/Core/Controller/Varien/Router/Standard.php(254): Mage_Core_Controller_Varien_Action->dispatch('index')
#16 /www/wwwroot/www/app/code/core/Mage/Core/Controller/Varien/Front.php(172): Mage_Core_Controller_Varien_Router_Standard->match(Object(Mage_Core_Controller_Request_Http))
#17 /www/wwwroot/www/app/code/core/Mage/Core/Model/App.php(365): Mage_Core_Controller_Varien_Front->dispatch()
#18 /www/wwwroot/www/app/Mage.php(684): Mage_Core_Model_App->run(Array)
#19 /www/wwwroot/www/index.php(83): Mage::run('', 'store')
#20 {main}";s:3:"url";s:1:"/";s:11:"script_name";s:10:"/index.php";s:4:"skin";s:7:"germany";}

 

Edit : /www/app/code/core/Mage/Eav/Model/Entity/Collection/Abstract.php Line: 265

Replace: return parent::addItem($object);

With: try { return parent::addItem($object); } catch (Exception $ex) { }

 

暂无评论

发布评论