amzn / amazon-payments-magento-2-plugin

Extension to enable Amazon Pay on Magento 2
https://amzn.github.io/amazon-payments-magento-2-plugin/
Apache License 2.0
106 stars 76 forks source link

Configuration changed after update #1198

Closed sfritzsche closed 4 months ago

sfritzsche commented 1 year ago

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

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.

dallin-beargroup commented 1 year ago

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

sfritzsche commented 1 year ago

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.

dallin-beargroup commented 1 year ago

@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?

sfritzsche commented 1 year ago

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

sgabhart22 commented 4 months ago

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.

sfritzsche commented 4 months ago

Thank you very much.