See related issues
https://www.drupal.org/node/2628058
https://www.drupal.org/node/2635974

Basically when you add a new field of type 'Mailchimp Subscription' - and do the fixes outlined in the related issues, and then select a list that you want to use, then you can no longer access the edit page for that field because of the following fatal error.

Fatal error: Cannot access protected property Drupal\field\Entity\FieldConfig::$entity_type in /home/admin/sites/gp.rhb.cc/public_html/modules/mailchimp/modules/mailchimp_lists/src/Plugin/Field/FieldType/MailchimpListsSubscription.php on line 203

$fields = $this->getFieldmapOptions($this->getFieldDefinition()->entity_type, $this->getFieldDefinition()->bundle);
$required_fields = $this->getFieldmapOptions($this->getFieldDefinition()->entity_type, $this->getFieldDefinition()->bundle, TRUE);

needs to change to this

$fields = $this->getFieldmapOptions($this->getFieldDefinition()->getTargetEntityTypeId(), $this->getFieldDefinition()->getTargetBundle());
$required_fields = $this->getFieldmapOptions($this->getFieldDefinition()->getTargetEntityTypeId(), $this->getFieldDefinition()->getTargetBundle(), TRUE);

Comments

mikefyfer created an issue. See original summary.

mikefyfer’s picture

Status: Active » Needs review
StatusFileSize
new1.25 KB

Here's a patch

Status: Needs review » Needs work

The last submitted patch, 2: mailchimp-field-edit-fix-2636628-2-8.0.1.patch, failed testing.

The last submitted patch, 2: mailchimp-field-edit-fix-2636628-2-8.0.1.patch, failed testing.

The last submitted patch, 2: mailchimp-field-edit-fix-2636628-2-8.0.1.patch, failed testing.

The last submitted patch, 2: mailchimp-field-edit-fix-2636628-2-8.0.1.patch, failed testing.

The last submitted patch, 2: mailchimp-field-edit-fix-2636628-2-8.0.1.patch, failed testing.

ruscoe’s picture

Status: Needs work » Fixed

Fixed as part of related issue: https://www.drupal.org/node/2635974

Status: Fixed » Closed (fixed)

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