magento / magento2

Prior to making any Submission(s), you must sign an Adobe Contributor License Agreement, available here at: https://opensource.adobe.com/cla.html. All Submissions you make to Adobe Inc. and its affiliates, assigns and subsidiaries (collectively “Adobe”) are subject to the terms of the Adobe Contributor License Agreement.
http://www.magento.com
Open Software License 3.0
11.49k stars 9.31k forks source link

Multiple Temando Shipping modules in 2.3.4 #27316

Closed nbennett25 closed 4 years ago

nbennett25 commented 4 years ago

There seem to be multiple Temando_Shipping modules in code in 2.3.4, which causes integrity constraint violations when running bin/magento setup:upgrade, since both modules are adding the same content with data upgrades.

Related: https://community.magento.com/t5/Magento-2-x-Technical-Issues/Integrity-constraint-violation-on-setup-upgrade-Magento-2-3-3/td-p/209198

composer show: ... temando/module-shipping 1.6.2 Temando multi-carrier shipping extension for Magento 2 temando/module-shipping-m2 1.6.2 Temando multi-carrier shipping extension for Magento 2 ...

Preconditions (*)

  1. Magento 2.3.4
  2. PHP 7.3

Steps to reproduce (*)

  1. Run composer install

Expected result (*)

  1. temando/module-shipping-m2 is installed

Actual result (*)

  1. Both temando/module-shipping and temando/module-shipping-m2 are installed
m2-assistant[bot] commented 4 years ago

Hi @nbennett25. Thank you for your report. To help us process this issue please make sure that you provided the following information:

Please make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, please, add a comment to the issue:

@magento give me 2.4-develop instance - upcoming 2.4.x release

For more details, please, review the Magento Contributor Assistant documentation.

@nbennett25 do you confirm that you were able to reproduce the issue on vanilla Magento instance following steps to reproduce?


hostep commented 4 years ago

It looks like one of both is a composer meta package, because only temando/module-shipping-m2 exists in the vendor directory.

Other observations by looking at the composer.lock file:

Strictly speaking this shouldn't be a problem but it can be a bit confusing.

In my opinion, this shouldn't cause database migration problems, so do you have more info about those @nbennett25 ?

nbennett25 commented 4 years ago

Thanks for the clarification on the meta module.

I’m just noticing that when running setup:upgrade with 2.3.4, I’m getting the constraint violation error listed in the link above. Commenting out line 73 in the Temando_Shipping/Setup/UpgradeData.php file ($this->installer->addMappedProductAttributes();) allows the setup:install command to work as expected.

The addMappedProductAttributes() method tries to add values to the temando_product_attribute_mapping and for whatever reason, those values already exist in the table.

Thx

On Mar 17, 2020, at 4:56 PM, Pieter Hoste notifications@github.com wrote:

It looks like one of both is a composer meta package, because only temando/module-shipping-m2 exists in the vendor directory.

Other observations by looking at the composer.lock file:

magento/product-community-edition requires temando/module-shipping temando/module-shipping requires temando/module-shipping-m2 Strictly speaking this shouldn't be a problem but it can be a bit confusing.

In my opinion, this shouldn't cause database migration problems, so do you have more info about those @nbennett25 https://github.com/nbennett25 ?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/magento/magento2/issues/27316#issuecomment-600294481, or unsubscribe https://github.com/notifications/unsubscribe-auth/ADE3SHBZ7YGRILVSJVYK7TTRH7PWJANCNFSM4LNXW2SQ.

engcom-Oscar commented 4 years ago

The issue not reproducible on 2.4-develop , as Temando shipping module been removed from Magento 2