When using the login pane in the checkout flow "Login or continue as guest" checkout pane:
If I try to login with incorrect credentials Drupal commerce checkout produces this error:

TypeError : Argument 1 passed to user_login_finalize() must implement interface Drupal\user\UserInterface, null given, called in /home/mywebsite/public_html/modules/contrib/commerce/modules/checkout/src/Plugin/Commerce/CheckoutPane/Login.php on line 413

I temporarily fixed the issue by implement the attached patch.

Comments

vincentdemers created an issue. See original summary.

vincentdemers’s picture

Assigned: Unassigned » vincentdemers
Status: Active » Closed (cannot reproduce)

This issue is not related to commerce checkout but was caused by the use of [#limit_validation_errors] in a custom form alter function on a login form element.