Problem/Motivation

Drupal\commerce_checkout\Plugin\Commerce\CheckoutPane\Login constructor signature has been modified in Commerce 3.

That leads to the following fatal error: Error: Call to a member function isAnonymous() on null in Drupal\commerce_checkout\Plugin\Commerce\CheckoutPane\Login->isVisible() (line 173 of modules/contrib/commerce/modules/checkout/src/Plugin/Commerce/CheckoutPane/Login.php).

Steps to reproduce

  • Install Email Registration 1.4 & Commerce 3
  • Add the email registration checkout pane
  • Go to checkout
  • Fatal error is thrown

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

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

plopesc created an issue. See original summary.

plopesc’s picture

Title: 1.x brnach incompatible with commerce v3 since the Login Pane constructor is different » 1.x branch incompatible with commerce v3 since the Login Pane constructor is different

plopesc’s picture

Status: Active » Needs review

MR created. Take into account this code is not compatible with Commerce v2.

astonvictor made their first commit to this issue’s fork.

grimreaper’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new5.48 KB

Hi,

Encountered the same issue after updating to Commerce 3.x.

Thanks for the MR, I applied the patch from it and no more fatal error.

gcb’s picture

StatusFileSize
new4.5 KB

I also tested this patch and it works for us. I'm uploading a "current" patch for use in composer builds, as the plain diff is unstable if more work is done, and the patch posted above has noise that prevents it from applying at the top.

steveallen74’s picture

Had the same issue after updating to Commerce 3..x and applying the patch from #8 solved it for me. Many thanks to everyone for your help with this!