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

Configuration changed after update

Open sfritzsche opened this issue 2 years ago • 4 comments

What I expected

We are currently updating various store regarding Magento 2.4.5-p3. The current AmazonPay configuration remains the same in terms of the rough intention.

What happened instead

After the first 3 magento instances we noticed in the frontend that in 2 instances where AmazonPay was enabled, Amazon Pay was suddenly disabled. In the 3rd instance AmazonPay was disabled before and enabled after the update.

Steps to reproduce the issue

Update amazon pay module from 5.14.3 to 5.15.0.

Your setup

  • Magento version: 2.4.5-p3
  • Amazon Pay Extension Version: 5.15.0
  • Magento Edition: Community

Possible cause

https://github.com/amzn/amazon-payments-magento-2-plugin/blob/de386a5ba83177564f271faf84a72f8b117557eb/Setup/Patch/Data/PerformKeyUpgrade.php#L110

All Magento 2 instances were migrated in the past from Magento 1 via the standard upgrade path (data migration tool).

Problem

If, as is common in our stores, old/unused configuration settings from older modules are still present in our database, they will be reactivated with the patch. The mentioned place now ensures that for example the old configuration of "payment/amazon_payment/active" is converted to "payment/amazon_payment_v2/active".

Regardless of whether you had already made new settings for the new paths before.

Expectation

A check if the destination path already has a configuration.

sfritzsche avatar Jun 29 '23 07:06 sfritzsche

Hello @sfritzsche, Thanks for your clear and concise information. Were the configuration paths for v2 added manually to the database? Dallin

dallin-beargroup avatar Jul 17 '23 14:07 dallin-beargroup

If "manually" means via PhpMyAdmin, for example, then no. The module was previously installed in version 5.14.3 and the customer has always made settings via the Magento backend.

sfritzsche avatar Jul 17 '23 14:07 sfritzsche

@sfritzsche, PR 1205 will now prevent any existing CV2 config from being overwritten during upgrade. After the patch messed up the config, you were able to correct the values with no further issues correct?

dallin-beargroup avatar Jul 18 '23 21:07 dallin-beargroup

@dallin-beargroup Correct, there were no other problems after the correction.

sfritzsche avatar Jul 20 '23 07:07 sfritzsche

Hello @sfritzsche ,

Just letting you know that version 5.17.0 of the module is now live, and includes these fixes! We'll be closing this issue shortly.

sgabhart22 avatar Apr 16 '24 13:04 sgabhart22

Thank you very much.

sfritzsche avatar Apr 16 '24 13:04 sfritzsche