Items with the same ID already exist in Magento

Source: Internet
Author: User
1, recently encountered such a problem in the Magento project (the contents of the error log):

a:5:{i:0;s:69: "Item (Mage_salesrule_model_rule) with the same ID" "already exist"; i:1;s:5399: "#0/home/websites/ blueberrypet/com170/lib/varien/data/collection/db.php (576): Varien_data_collection->additem (Object (Mage_ salesrule_model_rule)) #1/home/websites/blueberrypet/com170/app/code/core/mage/salesrule/model/validator.php ( : Varien_data_collection_db->load () #2/home/websites/blueberrypet/com170/app/code/core/mage/salesrule/ model/quote/freeshipping.php: Mage_salesrule_model_validator->init (' 1 ', ' 1 ', ' Blueberrypet25 ') #3/home/ websites/blueberrypet/com170/app/code/core/mage/sales/model/quote/address.php (957): Mage_SalesRule_Model_Quote_ Freeshipping->collect (Object (mage_sales_model_quote_address)) #4/home/websites/blueberrypet/com170/app/code/ core/mage/sales/model/quote.php (1263): Mage_sales_model_quote_address->collecttotals () #5/home/websites/ blueberrypet/com170/app/code/local/idev/onestepcheckout/model/sales/quote.php (+): Mage_Sales_Model_Quote-> CollecttotALS () #6/home/websites/blueberrypet/com170/app/code/core/mage/sales/model/quote.php (1839): Idev_OneStepCheckout_ Model_sales_quote->collecttotals () #7/home/websites/blueberrypet/com170/app/code/core/mage/sales/model/ quote.php (354): Mage_sales_model_quote->_afterload () #8/home/websites/blueberrypet/com170/app/code/core/mage/ checkout/model/session.php (148): Mage_sales_model_quote->loadbycustomer (Object (Mage_customer_model_customer) ) #9/home/websites/blueberrypet/com170/app/code/core/mage/checkout/model/cart.php (521): Mage_Checkout_Model_ Session->getquote () #10/home/websites/blueberrypet/com170/app/code/core/mage/checkout/block/cart/sidebar.php (189): Mage_checkout_model_cart->getsummaryqty () #11/home/websites/blueberrypet/com170/app/design/frontend/ Blueberrypet_pkg/default/template/checkout/cart/cartheader.phtml (+): mage_checkout_block_cart_sidebar-> Getsummarycount () #12/home/websites/blueberrypet/com170/app/code/core/mage/core/block/template.php (241): Include ('/home/webSites/') #13/home/websites/blueberrypet/com170/app/code/core/mage/core/block/template.php (272): Mage_Core_ Block_template->fetchview (' Frontend/bluebe ... ') #14/home/websites/blueberrypet/com170/app/code/core/mage/ core/block/template.php (286): Mage_core_block_template->renderview () #15/home/websites/blueberrypet/com170/ app/code/core/mage/core/block/abstract.php (863): mage_core_block_template->_tohtml () #16/home/websites/ blueberrypet/com170/app/code/core/mage/core/block/abstract.php (582): mage_core_block_abstract->tohtml () #17/ home/websites/blueberrypet/com170/app/code/core/mage/core/block/abstract.php (526): Mage_Core_Block_Abstract- >_getchildhtml (' Topcart ', true) #18/home/websites/blueberrypet/com170/app/design/frontend/blueberrypet_pkg/ default/template/page/html/header.phtml: mage_core_block_abstract->getchildhtml (' TopCart ') #19/home/ websites/blueberrypet/com170/app/code/core/mage/core/block/template.php (241): Include ('/home/websites/... ') #20/ Home/websites/blueberrypet/com170/app/code/core/mage/core/block/template.php (272): Mage_core_block_template->fetchview (' Frontend/bluebe ') #21/home/websites/blueberrypet/com170/app/code/core/mage/core/block/template.php (286): Mage _core_block_template->renderview () #22/home/websites/blueberrypet/com170/app/code/core/mage/core/block/ abstract.php (863): mage_core_block_template->_tohtml () #23/home/websites/blueberrypet/com170/app/code/core/ mage/core/block/abstract.php (582): mage_core_block_abstract->tohtml () #24/home/websites/blueberrypet/com170/ app/code/core/mage/core/block/abstract.php (526): mage_core_block_abstract->_getchildhtml (' header ', true) #25/ Home/websites/blueberrypet/com170/app/design/frontend/base/default/template/page/2columns-left.phtml (+): Mage_ Core_block_abstract->getchildhtml (' header ') #26/home/websites/blueberrypet/com170/app/code/core/mage/core/ block/template.php (241): Include ('/home/websites/... ') #27/home/websites/blueberrypet/com170/app/code/core/mage/ Core/block/template.php (272): Mage_core_block_template->fetchview (' frontend/base/d ... ') #28/home/websites/blueberrypet/ com170/app/code/core/mage/core/block/template.php (286): Mage_core_block_template->renderview () #29/home/ websites/blueberrypet/com170/app/code/core/mage/core/block/abstract.php (863): mage_core_block_template->_ ToHtml () #30/home/websites/blueberrypet/com170/app/code/core/mage/core/model/layout.php (555): Mage_Core_Block_ Abstract->tohtml () #31/home/websites/blueberrypet/com170/app/code/core/mage/core/controller/varien/ action.php (390): Mage_core_model_layout->getoutput () #32/home/websites/blueberrypet/com170/app/code/core/mage /customer/controllers/accountcontroller.php (+): Mage_core_controller_varien_action->renderlayout () #33/home /websites/blueberrypet/com170/app/code/core/mage/core/controller/varien/action.php (419): Mage_Customer_ Accountcontroller->indexaction () #34/home/websites/blueberrypet/com170/app/code/core/mage/core/controller/ varien/router/standard.php (2: Mage_core_controller_varien_action->dispatch (' index ') #35/home/websites/blueberrypet/com170/app/code/ core/mage/core/controller/varien/front.php (176): Mage_core_controller_varien_router_standard->match (Object ( mage_core_controller_request_http)) #36/home/websites/blueberrypet/com170/app/code/core/mage/core/model/app.php (354): Mage_core_controller_varien_front->dispatch () #37/home/websites/blueberrypet/com170/app/mage.php (683): Mage_core_model_app->run (Array) #38/home/websites/blueberrypet/com170/index.php: Mage::run (', ' Store ') #39 {main} "; s:3:" url "; s:18:"/customer/account/"; s:11:" Script_name "; s:10:"/index.php "; s:4:" Skin "; s:7:" Default ";}

The great God, help, see how this problem solved, thank you!

Reply content:

1, recently encountered such a problem in the Magento project (the contents of the error log):

a:5:{i:0;s:69: "Item (Mage_salesrule_model_rule) with the same ID" "already exist"; i:1;s:5399: "#0/home/websites/ blueberrypet/com170/lib/varien/data/collection/db.php (576): Varien_data_collection->additem (Object (Mage_ salesrule_model_rule)) #1/home/websites/blueberrypet/com170/app/code/core/mage/salesrule/model/validator.php ( : Varien_data_collection_db->load () #2/home/websites/blueberrypet/com170/app/code/core/mage/salesrule/ model/quote/freeshipping.php: Mage_salesrule_model_validator->init (' 1 ', ' 1 ', ' Blueberrypet25 ') #3/home/ websites/blueberrypet/com170/app/code/core/mage/sales/model/quote/address.php (957): Mage_SalesRule_Model_Quote_ Freeshipping->collect (Object (mage_sales_model_quote_address)) #4/home/websites/blueberrypet/com170/app/code/ core/mage/sales/model/quote.php (1263): Mage_sales_model_quote_address->collecttotals () #5/home/websites/ blueberrypet/com170/app/code/local/idev/onestepcheckout/model/sales/quote.php (+): Mage_Sales_Model_Quote-> CollecttotALS () #6/home/websites/blueberrypet/com170/app/code/core/mage/sales/model/quote.php (1839): Idev_OneStepCheckout_ Model_sales_quote->collecttotals () #7/home/websites/blueberrypet/com170/app/code/core/mage/sales/model/ quote.php (354): Mage_sales_model_quote->_afterload () #8/home/websites/blueberrypet/com170/app/code/core/mage/ checkout/model/session.php (148): Mage_sales_model_quote->loadbycustomer (Object (Mage_customer_model_customer) ) #9/home/websites/blueberrypet/com170/app/code/core/mage/checkout/model/cart.php (521): Mage_Checkout_Model_ Session->getquote () #10/home/websites/blueberrypet/com170/app/code/core/mage/checkout/block/cart/sidebar.php (189): Mage_checkout_model_cart->getsummaryqty () #11/home/websites/blueberrypet/com170/app/design/frontend/ Blueberrypet_pkg/default/template/checkout/cart/cartheader.phtml (+): mage_checkout_block_cart_sidebar-> Getsummarycount () #12/home/websites/blueberrypet/com170/app/code/core/mage/core/block/template.php (241): Include ('/home/webSites/') #13/home/websites/blueberrypet/com170/app/code/core/mage/core/block/template.php (272): Mage_Core_ Block_template->fetchview (' Frontend/bluebe ... ') #14/home/websites/blueberrypet/com170/app/code/core/mage/ core/block/template.php (286): Mage_core_block_template->renderview () #15/home/websites/blueberrypet/com170/ app/code/core/mage/core/block/abstract.php (863): mage_core_block_template->_tohtml () #16/home/websites/ blueberrypet/com170/app/code/core/mage/core/block/abstract.php (582): mage_core_block_abstract->tohtml () #17/ home/websites/blueberrypet/com170/app/code/core/mage/core/block/abstract.php (526): Mage_Core_Block_Abstract- >_getchildhtml (' Topcart ', true) #18/home/websites/blueberrypet/com170/app/design/frontend/blueberrypet_pkg/ default/template/page/html/header.phtml: mage_core_block_abstract->getchildhtml (' TopCart ') #19/home/ websites/blueberrypet/com170/app/code/core/mage/core/block/template.php (241): Include ('/home/websites/... ') #20/ Home/websites/blueberrypet/com170/app/code/core/mage/core/block/template.php (272): Mage_core_block_template->fetchview (' Frontend/bluebe ') #21/home/websites/blueberrypet/com170/app/code/core/mage/core/block/template.php (286): Mage _core_block_template->renderview () #22/home/websites/blueberrypet/com170/app/code/core/mage/core/block/ abstract.php (863): mage_core_block_template->_tohtml () #23/home/websites/blueberrypet/com170/app/code/core/ mage/core/block/abstract.php (582): mage_core_block_abstract->tohtml () #24/home/websites/blueberrypet/com170/ app/code/core/mage/core/block/abstract.php (526): mage_core_block_abstract->_getchildhtml (' header ', true) #25/ Home/websites/blueberrypet/com170/app/design/frontend/base/default/template/page/2columns-left.phtml (+): Mage_ Core_block_abstract->getchildhtml (' header ') #26/home/websites/blueberrypet/com170/app/code/core/mage/core/ block/template.php (241): Include ('/home/websites/... ') #27/home/websites/blueberrypet/com170/app/code/core/mage/ Core/block/template.php (272): Mage_core_block_template->fetchview (' frontend/base/d ... ') #28/home/websites/blueberrypet/ com170/app/code/core/mage/core/block/template.php (286): Mage_core_block_template->renderview () #29/home/ websites/blueberrypet/com170/app/code/core/mage/core/block/abstract.php (863): mage_core_block_template->_ ToHtml () #30/home/websites/blueberrypet/com170/app/code/core/mage/core/model/layout.php (555): Mage_Core_Block_ Abstract->tohtml () #31/home/websites/blueberrypet/com170/app/code/core/mage/core/controller/varien/ action.php (390): Mage_core_model_layout->getoutput () #32/home/websites/blueberrypet/com170/app/code/core/mage /customer/controllers/accountcontroller.php (+): Mage_core_controller_varien_action->renderlayout () #33/home /websites/blueberrypet/com170/app/code/core/mage/core/controller/varien/action.php (419): Mage_Customer_ Accountcontroller->indexaction () #34/home/websites/blueberrypet/com170/app/code/core/mage/core/controller/ varien/router/standard.php (2: Mage_core_controller_varien_action->dispatch (' index ') #35/home/websites/blueberrypet/com170/app/code/ core/mage/core/controller/varien/front.php (176): Mage_core_controller_varien_router_standard->match (Object ( mage_core_controller_request_http)) #36/home/websites/blueberrypet/com170/app/code/core/mage/core/model/app.php (354): Mage_core_controller_varien_front->dispatch () #37/home/websites/blueberrypet/com170/app/mage.php (683): Mage_core_model_app->run (Array) #38/home/websites/blueberrypet/com170/index.php: Mage::run (', ' Store ') #39 {main} "; s:3:" url "; s:18:"/customer/account/"; s:11:" Script_name "; s:10:"/index.php "; s:4:" Skin "; s:7:" Default ";}

The great God, help, see how this problem solved, thank you!

  • Contact Us

    The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

    If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

    A Free Trial That Lets You Build Big!

    Start building with 50+ products and up to 12 months usage for Elastic Compute Service

    • Sales Support

      1 on 1 presale consultation

    • After-Sales Support

      24/7 Technical Support 6 Free Tickets per Quarter Faster Response

    • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.