amazon-payments-magento-2-plugin icon indicating copy to clipboard operation
amazon-payments-magento-2-plugin copied to clipboard

setup:upgrade Failing with Amazon_Pay 5.16.1

Open tdorchak opened this issue 2 years ago • 3 comments

What I expected

After updating to 5.16.1 bin/magento setup:upgrade should run the setup scripts to make database updates.

What happened instead

When upgrading to 5.16.1 from 5.14 the setup:upgrade is failing because the core_config_data table is hardcoded in Setup/Patch/Data/PerformKeyUpgrade.php instead of dynamically adding a table prefix as many merchants do.

Steps to reproduce the issue

  1. Set a prefix on your database tables when installing magento for the first time
  2. Install Amazon_Pay 5.14.x
  3. Update Amazon_Pay by running composer require amzn/amazon-pay-magento-2-module
  4. Run bin/magento setup:upgrade

Your setup

  • Magento version: 2.4.6
  • Amazon Pay Extension Version: 5.16.1
  • Magento Edition: Enterprise

tdorchak avatar Nov 22 '23 14:11 tdorchak

Hello @tdorchak ,

We are aware of this issue, and the fix is planned to be included in 5.17.0. In the meantime, you can apply the attached patch to address failing upgrade script:

asd-1162.patch.txt

Sorry for the trouble!

Thanks, Spencer

sgabhart22 avatar Nov 22 '23 15:11 sgabhart22

Hi @sgabhart22,

When is 5.17.0 expected to release? Seems like it's been quite a while and this issue still occurs for new customers. ~~I tried to apply the patch above in my local but ran into the following issue: error: Setup/Patch/Data/PerformKeyUpgrade.php: No such file or directory.~~

~~My files are located here: vendor/amzn/amazon-pay-magento-2-module/Setup/Patch/Data/PerformKeyUpgrade.php~~

Besides that, will this work for my Bitbucket pipeline as the issue is triggering there as well and I currently can't deploy the module because of this.

EDIT: I was able to apply the patch by adding the full directory within the patch. This still doesn't solve the issue for our Bitbucket pipeline though and as such I can't deploy Amazon Pay to our ecommerce store.

Warm regards, Arjen

Hjsurk avatar Apr 03 '24 16:04 Hjsurk

Hello again @tdorchak and @Hjsurk , version 5.17.0 of the module is now live. Apologies for the long delay!

sgabhart22 avatar Apr 16 '24 12:04 sgabhart22