Drupal 8.0.1
When adding a new field of type 'Mailchimp Subscription' I get the following error.
Fatal error: Declaration of Drupal\mailchimp_lists\Plugin\Field\FieldFormatter\MailchimpListsSubscribeDefaultFormatter::viewElements() must be compatible with Drupal\Core\Field\FormatterInterface::viewElements(Drupal\Core\Field\FieldItemListInterface $items, $langcode) in /XXXX/public_html/modules/mailchimp/modules/mailchimp_lists/src/Plugin/Field/FieldFormatter/MailchimpListsSubscribeDefaultFormatter.php on line 24
It allows the creation of the field still, but you cannot do the following "Select a list to sync with on the Field Settings tab before configuring the field instance." - because the field settings tab throws the following fatal error.
Fatal error: Cannot access protected property Drupal\field\Entity\FieldConfig::$field_type in /XXXX/public_html/modules/mailchimp/modules/mailchimp_lists/mailchimp_lists.module on line 54
Looks like on line 48
$storage = $form_state->getStorage();
$storage is now protected (haven't looked to see what it was before) and therefore
if ($field_config->field_type == 'mailchimp_lists_subscription') {
is no longer evaluating.
This then prevents me from selecting a list for the field.
Comments
Comment #2
mikefyfer commentedMarking as a duplicate of this issue - https://www.drupal.org/node/2628058
Comment #3
mikefyfer commentedChanging title to reflect the main issue, the issue that was marked as a duplicate was really only in reference to the second part of this issue.
Comment #4
mikefyfer commentedComment #5
Fonkel commentedAny update on this issue? Currently this blocks me from making a viewmode for sending contact form emails.
Comment #7
ruscoe commentedThanks for the report. This is now fixed in the 8.x-1.x dev branch.
Comment #8
Badlapje commentedNot sure this is fixed, i've just tried to create a simple content type with an email field and i'm getting this error:
Although additionally i should note i don't see any configuration options for mailchimp after enabling all 4 modules.
Comment #9
mikefyfer commentedYeah, I'm going to reopen this. I just installed the latest dev and I'm still experiencing the same issue.
Comment #11
ruscoe commentedI wasn't able to reproduce the error with
MailchimpListsSubscribeDefaultFormatter, but the error message in #8 showsMailchimpListsSubscribeDefaultFormatter::viewElementsmissing its second parameter ($langcode).@Badlapje / @mikefyfer, would you mind checking your version of
MailchimpListsSubscribeDefaultFormatter.phpmatches this line?Related - I noticed the same problem existed in
MailchimpListsFieldSubscribeFormatter. This commit adds the missing parameter there.Comment #12
ruscoe commented