module-shipper icon indicating copy to clipboard operation
module-shipper copied to clipboard

Duplicates in shipperhq_order_detail

Open gorillagroup opened this issue 10 years ago • 2 comments

For some reason there have been duplicates in shipperhq_order_detail, shipperhq_order_detail_grid tables (meaning 2 rows for 1 order_id) - which results in php Fatal Error popping out in the admin panel order view screen.

We are still investigating the exact nature of the reason behind duplicates - but we think there should be some safety measure how to prevent that (unique db key constraint), or prevent fatal error during the "join" operation here: \ShipperHQ\Shipper\Plugin\Order\CollectionFactory::aroundGetReport.

gorillagroup avatar Nov 21 '16 14:11 gorillagroup

Thanks for raising. The latest version of ShipperHQ includes a fix for this issue.

wsagen avatar Dec 15 '16 03:12 wsagen

Hi, We would like to get this ticket reopened. We've noticed that the shipperhq_order_detail_grid.order_id column still doesn't have a unique constraint, which means that it'd still be possible to have duplicated entries in the future and a look around your code seems to indicate that no special logic really prevents multiple order shipment details from being created for any single order. We would like to see a more permanent fix as it came up to our platform a second time already.

This other ticket below, also confirms that the only thing that was done, was the deletion of pre-existing duplicated entries in the upgrade migration, but no schema or code changes. https://github.com/shipperhq/module-shipper/issues/26

Thank you in advance

pjean-gorillagroup avatar Aug 21 '17 16:08 pjean-gorillagroup