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

Issue fork profile-3559990

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

trickfun created an issue. See original summary.

medha kumari’s picture

Assigned: Unassigned » medha kumari

Working on It.

trickfun’s picture

$form['actions'] doesn't exist when attachSubmit run.

medha kumari’s picture

Assigned: medha kumari » Unassigned
Status: Active » Needs review
StatusFileSize
new1.86 KB

Please review this patch.

jsacksick’s picture

Please open an MR so the tests can run.

trickfun’s picture

Could not apply patch on both 1.13 and dev version.

trickfun’s picture

Plain diff works fine.
Thank you

rclemings’s picture

Status: Needs review » Reviewed & tested by the community

Diff 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.

kewesley’s picture

We also experienced the WSOD on checkout on two sites following the upgrade to 1.13, both fixed by applying the patch from MR 40.

jsacksick’s picture

Status: Reviewed & tested by the community » Fixed

Merged, thanks everyone!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.