I got an error in log like

main.CRITICAL: Item (Magento\SalesRule\Model\Rule) with the same ID "33" already exists. {"exception":"[object] (Exception(code: 0): Item (Magento\SalesRule\Model\Rule) with the same ID \"33\" already exists. at vendor/magento/framework/Data/Collection.php:404)"} []

How can I resolve this? Any quick solution

  • Are you running Magento Enterprise? – Renon Stewart Jan 3 at 18:52

This issue occurs if you have duplicate rows in "salesrule" database table with the same "created_in" and "update_in" range.

select * from salesrule where rule_id = 71;

You should use 33 instead of 71

The result should look like (note: row_id 198 and 388 has the same date range):

enter image description here

To fix, you will need to split the values in updated_in for row_id 198 and the created_id for row_id 388

update salesrule set updated_in = 2147480000 where row_id = 198;
update salesrule set created_in = 2147480000 where row_id = 388;

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.