When loading a mailchimp field on the login/register form the site crashes and throws the following error:

Error: Call to undefined method Drupal\commerce_checkout\Plugin\Commerce\CheckoutFlow\MultistepDefault::getOperation() in Drupal\mailchimp_lists\Plugin\Field\FieldWidget\MailchimpListsSelectWidget->formElement()

(line 121 of /www/web/modules/contrib/mailchimp/modules/mailchimp_lists/src/Plugin/Field/FieldWidget/MailchimpListsSelectWidget.php)

The getOperation() function is missing please can you advise where this should be?

CommentFileSizeAuthor
#3 error_fix-3072547-3.patch982 bytesinit90

Comments

mbatterton created an issue. See original summary.

init90’s picture

Hi, @mbatterton

I also encountered with the issue some time ago. The problem caused by changes which were committed in the issue:

Existing subscriber data overwritten when creating a new entity with a subscription field

Also, I've added patch which fixed the problem to the issue above.

init90’s picture

init90’s picture

Status: Active » Needs review

Set to NR.

berdir’s picture

Status: Needs review » Reviewed & tested by the community

Makes sense, instead of the method_exists(), it could also be a instanceof EntityFormInterface.

dunebl’s picture

#4 remove the error, thank you

mshaver’s picture

Assigned: Unassigned » samuel.mortenson

  • init90 authored 3426365 on 8.x-1.x
    Issue #3072547 by init90, Berdir: Missing function $build_info['...
samuel.mortenson’s picture

Status: Reviewed & tested by the community » Fixed

Switched to an interface check per #5 but otherwise this should be fixed on the next commit. Thanks all!

Status: Fixed » Closed (fixed)

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