Open steveberrill opened 1 month ago
Hi @steveberrill. Thank you for your report. To speed up processing of this issue, make sure that the issue is reproducible on the vanilla Magento instance following Steps to reproduce. To deploy vanilla Magento instance on our environment, Add a comment to the issue:
@magento give me 2.4-develop instance
- upcoming 2.4.x release@magento I am working on this
Join Magento Community Engineering Slack and ask your questions in #github channel. :warning: According to the Magento Contribution requirements, all issues must go through the Community Contributions Triage process. Community Contributions Triage is a public meeting. :clock10: You can find the schedule on the Magento Community Calendar page. :telephone_receiver: The triage of issues happens in the queue order. If you want to speed up the delivery of your contribution, join the Community Contributions Triage session to discuss the appropriate ticket.
I had this exact same issue upon upgrade from 2.4.6-p6 to 2.4.7-p1, in sandbox testing on development environment it did not occur but in my case it only occurred in production (... customers were unable to place orders regardless if they selected the PayPal payment method or not, that was an interesting hour I'm never getting back!) The workaround that appears to have resolved it was Stores > Configuration > Sales > Payment Methods > Additional Payment Solutions > PayPal Braintree > Configure > PayPal through Braintree > Styling > Checkout Page > PayPal Button and changing the button configuration, then Pay Later Messaging > Reset to Recommended Defaults. Finally, Save Config (and flushing magento cache). That resolved the error, and I was able to return to the button configuration and restore previous settings (including "Gold" color selection) without issue.
The key to reproducing this error might be the upgrade from 2.4.6 to 2.4.7 where PayPal credit was configured and enabled in 2.4.6 prior to the upgrade.
Hi @engcom-Delta. Thank you for working on this issue. In order to make sure that issue has enough information and ready for development, please read and check the following instruction: :point_down:
Area: XXXXX
label to the ticket, indicating the functional areas it may be related to.2.4-develop
branch@magento give me 2.4-develop instance
to deploy test instance on Magento infrastructure. 2.4-develop
branch, please, add the label Reproduced on 2.4.x
.Issue: Confirmed
once verification is complete. Hi @steveberrill,
Thanks for your reporting and collaboration. We have verified the issue in magento 2.4.7-p1, but we are unable to reproduce the issue. Kindly refer the screenshots.
Steps to reproduce
Install magento 2.4.7-p1
Enable & configure paypal/module-braintree-core: 4.6.1-p1
Set PayPal Button color to Gold and apply
Access frontend
Add an item to cart and navigate to checkout
Observe the Paypal button in gold.
No Error displays in checkout related to button.
Change the Paypal button color again e.g. Black and apply
Access frontend again and navigate to checkout. Button is displaying as expected with no error related to button.
Please let us know if any other steps are needed to be performed. Thanks.
Again... The key to reproducing this error might be the upgrade from 2.4.6 to 2.4.7 where PayPal credit was configured and enabled in 2.4.6 prior to the upgrade. The attempt to reproduce did not perform the upgrade first
Yes as I have upgraded from 2.4.5-p6 to 2.4.7-p1 on 3 installations and produced the same error.
Hi @steveberrill,
Thanks for your reporting and collaboration. We have verified the issue and it is reproducible. Hence, Confirming the issue.
Steps to Reproduce
Install magento 2.4.6-p5
Configure Braintree Payments - PayPal
Configure PayPal button color to gold
Upgrade 2.4.6-p5 to 2.4.7-p2
Access frontend and navigate to checkout.
Observe checkout is blank and error displays in log.
Thanks.
Unfortunately, not enough information was provided to create a Jira ticket. Please make sure you added the following label(s): Reproduced on 2.4.x
, ^Area:.*
Once all required labels are present, please add Issue: Confirmed
label again.
Unfortunately, not enough information was provided to create a Jira ticket. Please make sure you added the following label(s): Reproduced on 2.4.x
, ^Area:.*
Once all required labels are present, please add Issue: Confirmed
label again.
:white_check_mark: Jira issue https://jira.corp.adobe.com/browse/AC-12849 is successfully created for this GitHub issue.
:white_check_mark: Confirmed by @engcom-Bravo. Thank you for verifying the issue.
Issue Available: @engcom-Bravo, You will be automatically unassigned. Contributors/Maintainers can claim this issue to continue. To reclaim and continue work, reassign the ticket to yourself.
Preconditions and environment
Environment:
Magento Version: 2.4.7-p1 paypal/module-braintree-core: 4.6.1-p1 PHP Version: 8.3
When using the paypal/module-braintree-core module in Magento 2, an Undefined array key "gold" warning is triggered during checkout. This occurs in the getCreditButtonColor() method of the PayPal\Braintree\Gateway\Config\PayPal\Config class.
Code Example:
The issue is located in the getCreditButtonColor() method in the Config.php file:
Proposed Fix:
Update the method to check if the key exists in the $options array before accessing it:
Steps to reproduce
Ensure that the paypal/module-braintree-core module is installed. Configure button colors in the Magento admin panel for the Braintree payment method. Proceed to checkout on the frontend. Observe the error in the logs or directly on the checkout page. Expected Behavior:
The method should gracefully handle cases where the specified color key (e.g., "gold") does not exist in the configuration, returning null or a default value instead of causing a warning.
Expected result
The method should gracefully handle cases where the specified color key (e.g., "gold") does not exist in the configuration, returning null or a default value instead of causing a warning.
Actual result
An Undefined array key "gold" warning is triggered, leading to a potential disruption in the checkout process and a cluttered error log.
Additional information
Release note
No response
Triage and priority