Describe your bug or feature request.

Login.php throws exception while editing the default checkout pane.
Error: Call to a member function getFormModeOptions() on null in Drupal\commerce_checkout\Plugin\Commerce\CheckoutPane\Login->buildConfigurationForm() (line 144 of /code/web/modules/contrib/commerce/modules/checkout/src/Plugin/Commerce/CheckoutPane/Login.php).

If a bug, provide steps to reproduce it from a clean install.

After updating commerce to 3.0.alpha version. then the system throws this exception. The dev version also throws the error.

Issue fork commerce-3473511

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

qaiser iqbal created an issue. See original summary.

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

dan_metille’s picture

Same error while updating from Commerce 8.x-2 to any 3.0.0 version. Any idea about how to fix it?

jsacksick’s picture

Priority: Major » Normal

Do you define a custom checkout pane extending the Login pane? This isn't happening for me on a default install, so I'm assuming custom code is triggering this, therefore lowering the issue priority.

jsacksick’s picture

Status: Active » Closed (cannot reproduce)

Closing this as this isn't happening on a Vanilla install... Feel free to reopen in case you are able to provide reproducible steps on a clean install.

qaiser iqbal’s picture

No, I don't have any custom checkout pane. I am only using commerce_recurring and commerce_license. They might have causing the issue.

qaiser iqbal’s picture

Status: Closed (cannot reproduce) » Active
jsacksick’s picture

Again, without reproducible steps... Not much I can do, On a test install I have, with commerce 3 enabled, commerce_license & commerce_recurring, I'm not experiencing this...

jsacksick’s picture

Status: Active » Postponed (maintainer needs more info)
lakhithad’s picture

I got the same error described below when trying to edit or create any checkout workflow. Im on Drupal 10.4 and commerce 3.0.0.
Issue solved when downgraded to commerce 2.4 and the error is gone.

Error: Call to a member function getFormModeOptions() on null in Drupal\commerce_checkout\Plugin\Commerce\CheckoutPane\Login->buildConfigurationForm() (line 144 of /var/www/html/web/modules/contrib/commerce/modules/checkout/src/Plugin/Commerce/CheckoutPane/Login.php).
Severity	Error

Update: I figured out the issue.
I was using a module email_registration:^1.4 which caused the issue. Then I updated it to email_registration:^2.0@RC and did a database update. And now the issue is gone and I can use commerce 3.0.0 with Drupal 10.4
During the database update the following happened.
hook_update_n 9001 - Remove the removed "require_username_on_registration" config.

yekaterina k’s picture

Thanks @lakhithad, indeed in my case it was also email_registration which caused the problem

jsacksick’s picture

Status: Postponed (maintainer needs more info) » Closed (won't fix)

Since this is already tracked in Commerce email and Commerce cannot do anything about it, closing this.