I get the following notice messages in the MailchimpSignupPageForm:

Notice: Undefined index: gdpr_consent in Drupal\mailchimp_signup\Form\MailchimpSignupPageForm->buildForm() (line 231 of modules/contrib/mailchimp/modules/mailchimp_signup/src/Form/MailchimpSignupPageForm.php).

Notice: Undefined index: ajax_submit in Drupal\mailchimp_signup\Form\MailchimpSignupPageForm->buildForm() (line 266 of modules/contrib/mailchimp/modules/mailchimp_signup/src/Form/MailchimpSignupPageForm.php).

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

InaW created an issue. See original summary.

InaW’s picture

Version: 8.x-1.11 » 8.x-1.x-dev
InaW’s picture

Attached I uploaded a patch that checks undefined keys before accessing them.

samuel.mortenson’s picture

Status: Needs review » Fixed

LGTM, thanks @InaW!

  • InaW authored 4ab3fa8 on 8.x-1.x
    Issue #3086453 by InaW: Notice: Undefined index in...
Omar Alahmed’s picture

Re-roll #3 to work with 8.x-1.11 without the ajax submit.

Status: Fixed » Closed (fixed)

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

astringer’s picture

#6 works for me on 8.x-1.11, can we get this patch applied?

jakubmrozonline’s picture

#6 worked for me as well.

JFeltkamp’s picture

#6 works, thanks for that

unstatu’s picture

I had this problem as well but I got a new NOTICE error when I signed up.

This patch fixes it.

Anonymous’s picture

Will a new release of Mailchimp be issued to resolve this bug?

codesmith’s picture

@unstatu - this patch was already committed. Please open a new issue with your new patch - looks good! Thanks!

unstatu’s picture

Thanks for the guidance @codesmith. As it was the same bug I was not sure if I should create a new issue for it. Even if it was already closed.

I have created the new issue in https://www.drupal.org/project/mailchimp/issues/3102045

developer-rocha’s picture

The problem still happens in the version 8x1.12
Patch to fix it for this version:

developer-rocha’s picture

This patch works for the version 8x1.12