I've just upgraded MySQL as recommended by Plesk and we're now being hit with the following error when trying to access Sales -> Orders;

Item (Mage_Sales_Model_Order) with the same id "56321" already exist

Could this have been caused by the update? it wasn't a big update just an incremental one (we're on 5.5.54)

Any help is greatly appreciated

EDIT: I did actually place a test order on the site and deleted it shortly after using Magehit's extension Delete Order.

I assumed this wouldn't cause an issue as we've done it loads of times in the past.


It turned out, deleting the two test orders and upgrading MySQL caused some sort of anomaly where when a customer placed an order it somehow reused one of the test order ids (and i saw the test products on the order and test shipping details etc).

Incase this helps someone in the future, I recreated the customer orders in the backend, made them aware and deleted the old one - that solved the issue.

I did actually alter the varian/db.php function to exclude the error (and it broke the grids design but this clarified the cause for me)

Hope this helps someone

  • You can also accept your own answer :) – sv3n Mar 5 '18 at 19:39

You can update the rewritten grid file's function with below,

protected function _prepareCollection()
   $collection = Mage::getResourceModel($this->_getCollectionClass());

   // Add this line before the setCollection Function

   return parent::_prepareCollection();

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.