• Hi MailChimp Team,

    I have set up a list with groups in MailChimp for which I wanted to use the plugin.
    The plugin recognized the groups and automatically added a dropdown to the form.
    The generated <select> is prepopulated with the available groups but also offers an empty <option> at top which is preselected.
    Problem: When the empty <option> is selected and the form is submitted, this error occurs:
    Fatal error: Cannot access empty property in …/wp-content/plugins/mailchimp/mailchimp.php on line 938

    I hotfixed the error with a check against empty($value) before the line, but now a user can subscribe without selecting a group. I’d love to have an error telling the user to select a group. Is this an unhandled edge case? Or did I set up my groups wrong?

    Thanks for your help,
    Ernesto

    https://wordpress.org/plugins/mailchimp/

Viewing 1 replies (of 1 total)
  • Hey Eelsaesser,

    Thanks for letting us know! I tested this out in my account and am seeing the same thing.

    I’ve let our devs know about this issue so they can take a closer look. In the meantime, you can use a regular dropdown merge field instead of a group field to collect that information. Unlike groups, these merge fields can be set to required, so you can be sure to collect that information when folks subscribe through your form.

    Thanks again for reaching out, and please feel free to reach back out if you have any other questions.

    Garnet

Viewing 1 replies (of 1 total)

The topic ‘Dropdown group produces fatal error’ is closed to new replies.