Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Issue with foreign key constraint on expired quotes #3

Open
pawel989 opened this issue Aug 22, 2023 · 1 comment
Open

Issue with foreign key constraint on expired quotes #3

pawel989 opened this issue Aug 22, 2023 · 1 comment

Comments

@pawel989
Copy link

pawel989 commented Aug 22, 2023

Error message:
Unable to delete expired quote (ID: 517019): PDOException: SQLSTATE[23000]: Integrity constraint violation: 1451 Cannot delete or update a parent row: a foreign key constraint fails (db.getresponse_cart_map, CONSTRAINT GETRESPONSE_CART_MAP_CART_ID_QUOTE_ENTITY_ID FOREIGN KEY (cart_id) REFERENCES quote (entity_id))

Steps to reproduce:

  1. Login to the Magento 2 platform as a customer
  2. Add few items to the basket
  3. Log out and leave the basket "abandoned"

Final result:
Magento 2 is going to produce the error during the attempt to clean up the expired quotes.

@pawel989
Copy link
Author

pawel989 commented Nov 3, 2023

We have identified another issue that might be related:
Integrity constraint violation: 1451 Cannot delete or update a parent row: a foreign key constraint fails (db.getresponse_cart_map, CONSTRAINT GETRESPONSE_CART_ MAP_CART_ID_QUOTE_ENTITY_ID FOREIGN KEY (cart_id) REFERENCES quote (entity_id)), query was: DELETE FROM quote WHERE (entity_id='12345') in /vendor/magento/framework/DB/Statem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant