Problem/Motivation
After update to 1.13 i get this error
TypeError: array_search(): Argument #2 ($haystack) must be of type array, null given in array_search() (line 223 of modules/contrib/profile/src/Plugin/Field/FieldWidget/ProfileFormWidget.php).
Drupal\profile\Plugin\Field\FieldWidget\ProfileFormWidget::attachSubmit(Array, Object, Array)
call_user_func_array(Array, Array) (Line: 1010)
Drupal\Core\Form\FormBuilder->doBuildForm('commerce_checkout_flow_multistep_default', Array, Object) (Line: 1077)
Drupal\Core\Form\FormBuilder->doBuildForm('commerce_checkout_flow_multistep_default', Array, Object) (Line: 1077)
Drupal\Core\Form\FormBuilder->doBuildForm('commerce_checkout_flow_multistep_default', Array, Object) (Line: 571)
Drupal\Core\Form\FormBuilder->processForm('commerce_checkout_flow_multistep_default', Array, Object) (Line: 321)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 219)
Drupal\Core\Form\FormBuilder->getForm(Object, 'login') (Line: 143)
Drupal\commerce_checkout\Controller\CheckoutController->formPage(Object)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->{closure:Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber::wrapControllerExecutionInRenderContext():121}() (Line: 627)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 121)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->{closure:Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber::onController():96}() (Line: 183)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 53)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 28)
Drupal\Core\StackMiddleware\ContentLength->handle(Object, 1, 1) (Line: 32)
Drupal\big_pipe\StackMiddleware\ContentLength->handle(Object, 1, 1) (Line: 116)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 90)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 50)
Drupal\ban\BanMiddleware->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 53)
Drupal\Core\StackMiddleware\AjaxPageState->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 715)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
Steps to reproduce
Add product to cart as Anonymous user.
Go to the cart and then to the checkout login step.
First step has "Login with email registration or continue as guest"
and
Display label: Login with email registration or continue as guest
Wrapper element: Container
Checkout Ospite: Not allowed
Registration: Not allowed
Comments
Comment #2
medha kumariWorking on It.
Comment #3
trickfun commented$form['actions'] doesn't exist when attachSubmit run.
Comment #4
medha kumariPlease review this patch.
Comment #5
jsacksick commentedPlease open an MR so the tests can run.
Comment #6
trickfun commentedCould not apply patch on both 1.13 and dev version.
Comment #8
trickfun commentedPlain diff works fine.
Thank you
Comment #9
rclemings commentedDiff from merge request works here too on production site. RTBC and hiding patch.
Without this, creating a new user during Commerce checkout is a WSOD.
Comment #10
kewesley commentedWe also experienced the WSOD on checkout on two sites following the upgrade to 1.13, both fixed by applying the patch from MR 40.
Comment #12
jsacksick commentedMerged, thanks everyone!