Closed (fixed)
Project:
Commerce Core
Version:
8.x-2.x-dev
Component:
Checkout
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
20 Feb 2017 at 11:54 UTC
Updated:
8 Mar 2017 at 11:14 UTC
Jump to comment: Most recent
Comments
Comment #3
bojanz commentedComment #5
bojanz commentedComment #6
ransomweaver commentedWow, this little change really blew up my payment gateway module! In causing an existing payment method to be selected by default, an unintended consequence is that the payment gateway doesn't load (at least for my module) the JS libraries in the initial payment information form, because buildCreditCardForm with $element['#attached']['library'][] is not run until ajax does it when you switch to add a new payment method.
This core ajax issue is implicated, I think: https://www.drupal.org/node/1988968
To work around this I have had to move my js library attaching to a hook_form_alter, which is not great since I have different js libs to load depending on test vs production, which is found from the gateway plugin config.
@bojanz you should check if braintree is similarly affected, as should anyone who uses js during checkout.
Comment #7
bojanz commentedOpened #2854852: Payment gateway JS is not always loaded.