Closed (duplicate)
Project:
Commerce Core
Version:
8.x-2.x-dev
Component:
Checkout
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
4 Feb 2017 at 15:47 UTC
Updated:
10 Feb 2017 at 16:06 UTC
Jump to comment: Most recent
Comments
Comment #2
ransomweaver commentedI tried to track this down; here is some more info.
When you submit the PaymentInformation form with an existing payment method, validation happens for the Shipping profile in
commerceguys/addressing/src/Validator/Constraints/AddressFormatConstraintValidator::validateFields, which is ok.
However the payment information part is processed by Drupal\Core\Form\FormValidator->doValidateForm, and its called by CheckoutConroller->formPage. StackTrace:
→'21: Drupal\Core\Form\FormValidator->doValidateForm()' => array(2)
→'20: Drupal\Core\Form\FormValidator->validateForm()' => array(2)
→'19: Drupal\Core\Form\FormBuilder->processForm()' => array(2)
→'18: Drupal\Core\Form\FormBuilder->buildForm()' => array(2)
→'17: Drupal\commerce_checkout\Controller\CheckoutController->formPage()' => array(2)
CheckoutController->formPage() is called four times:
1) page load
2) ajax change to existing payment method
3) ajax shipping recalculate
4) the reload after validation failure, so maybe this is just #1 again.
I can't see any difference in what is passed to the form builder each time, and I don't have a clue where in buildForm or processForm its going wrong.
Comment #3
bojanz commentedThe bug turned out to be on the shipping side: #2849594: ShippingInformation's "Recalculate shipping" is not compatible with PaymentInformation.