1

After updating to 2.3.3. I get the following error for the Temando_Shipping module. I disabled the module but that gives errors when editing products. When I try to enable and run 'magento setup:upgrade' again get this error.

Upgrading data.. SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'origin.address.countryCode' for key 'PRIMARY', query was: INSERT  INTO `temando_product_attribute_mapping` (`node_path_id`,`label`,`description`,`mapping_attribute_id`,`is_default`) VALUES (?, ?, ?, ?, ?), (?, ?, ?, ?, ?), (?, ?, ?, ?, ?), (?, ?, ?, ?, ?), (?, ?, ?, ?, ?), (?, ?, ?, ?, ?)
4
  • can you share your script?
    – sudo55
    Commented Oct 24, 2019 at 11:57
  • script? There isn't any script. Just did an update to 2.3.3. and then run magento setup:upgrade'. Also after disabling and enabling I get the same error on the "Upgrading data" step.
    – AntondeG
    Commented Oct 24, 2019 at 12:06
  • @AntondeG May i know how you solve this issue, help me thanks magento.stackexchange.com/q/318439/57334
    – zus
    Commented Jul 28, 2020 at 11:34
  • @zus, I used the accepted answer below. That worked for me.
    – AntondeG
    Commented Jul 29, 2020 at 16:37

1 Answer 1

3

This looks like a bug in temando/module-shipping-m2 which is required by magento/product-community-edition. The data is added in vendor/temando/module-shipping-m2/Setup/UpgradeData.php:73

I first checked if there are any differences between the content in my db and the data the module upgrade step tries to insert:

select * from temando_product_attribute_mapping;

In my case, the data was identical, so I deleted it with

delete from temando_product_attribute_mapping;

and ran bin/magento setup:upgrade again. This time, it worked without issues.

Still, this is more a workaround than a solution. I've sent the author of the package a mail to inform him of the problem.

3
  • This indeed works, thx!
    – AntondeG
    Commented Oct 25, 2019 at 12:21
  • @AntondeG Please accept the anwser if it was helpful for you :)
    – kolaente
    Commented Oct 26, 2019 at 20:10
  • perfect solution @kolaente Thank You !! Commented Dec 6, 2019 at 13:18

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.