shipperhq / module-shipper

Base ShipperHQ Repo
Open Software License 3.0
21 stars 21 forks source link

SQLSTATE[23000]: Integrity constraint violation #88

Closed gulshankumar closed 2 years ago

gulshankumar commented 3 years ago

We are observing the below error in exception.log for past few weeks after upgrading the module.

report.CRITICAL: Report ID: webapi-6023ea889e0b5; Message: SQLSTATE[23000]: Integrity constraint violation: 1452 Cannot add or update a child row: a foreign key constraint fails (propper_m2_prod.shipperhq_quote_item_detail, CONSTRAINTSHIPPERHQ_QUOTE_ITEM_DETAIL_QUOTE_ITEM_ID_QUOTE_ITEM_ITEM_IDFOREIGN KEY (quote_item_id) REFERENCESquote_item(item_id) ON ), query was: INSERT INTOshipperhq_quote_item_detail(quote_item_id,carrier_group_id,carrier_group) VALUES (?, ?, ?)

I have seen foreign keys were added to an upgrade in your module. Is there any fix available to this error?

wsagen commented 3 years ago

Hi, thanks for reporting this. Can you please provide some additional information on how to reproduce this:

  1. Version of Magento you are using
  2. Actions or steps to reproduce the error or exception
  3. Do you have third party apps installed on your checkout e.g. Cart2Quote
wsajosh commented 3 years ago

@gulshankumar We've removed this constraint for now. Please update to the latest version

If you can provide us with the above information it would be greatly appreciated. We're looking to re-add the foreign key once we understand where the issue has stemmed from

melindash commented 3 years ago

@wsajosh We have a client on Magento 2.3.5-p1 with this issue. Here's how we reproduce on their instance: Create an order In the order view, click the Edit button (it may need to be shipped, first, I haven't checked)

wsajosh commented 2 years ago

Closing this issue as its been resolved in later versions of the extension.