Support

Home Forums Event Espresso Premium EE Mailchimp Integration

EE Mailchimp Integration

Posted: October 23, 2020 at 3:31 pm


AlphaStar

October 23, 2020 at 3:31 pm

Hello,

We have just recognized that since August 2019 the integration is not working properly.Most of the new registrations are not registered to the mailchimp list.
This is the error message we get “This registration could not be subscribed to a MailChimp List with ID: 52877815d8. There were errors regarding the following: MailChimp field tagged merge_fields.ADDRESS2 had the error: Data did not match any of the schemas described in anyOf.. Any mandatory or multi-choice fields that are in this MailChimp list require to be paired with Event questions that correspond by type and possibly by having the same answer values. If you have further problems please contact support.”

How we can solve the issue?

Thank you,


Tony

  • Support Staff

October 26, 2020 at 7:53 am

Hi there,

Ok, so the error you are getting come in this format:

This registration could not be subscribed to a MailChimp List with ID: {mailchimp_list_id}. There were errors regarding the following: MailChimp field tagged {mailchimp_filed) had the error: {error_from_mailchimp}

The important/helpful part should be the {error_from_mailchimp} as it would normally give you an indication of what the actual problem was, but here it’s not that useful.

Within your merge fields do you have an address2 field? If so, is it set to be an ‘Address’ field?

If so, I recommend switching that to be a text field as MailChimp have very strict validation on the fields of type address which is likely what is causing the problem above.

If not, can you add a screenshot of your MailChimp merge fields so I can take a look?


AlphaStar

October 28, 2020 at 11:18 am

This reply has been marked as private.


Tony

  • Support Staff

October 28, 2020 at 12:23 pm

Ok, so your Address2 merge var is already a text field.

Are you setting a value for that merge field in the MailChimp questions on each event?


AlphaStar

October 28, 2020 at 1:31 pm

This reply has been marked as private.


Tony

  • Support Staff

November 2, 2020 at 3:29 pm

I did some digging into this and noticed that your Address 2 field on the registration form isn’t required, so do subscriptions fail when you don’t add a value to Address 2 but work when do?

I neither work we’ll need to add some debug code to the site to confirm what values are being sent over MailChimp during the request and see if that shows any clues as to what may be happening.


AlphaStar

November 3, 2020 at 9:24 pm

This reply has been marked as private.


Tony

  • Support Staff

November 4, 2020 at 4:55 pm

Add this snippet to your site:

https://gist.github.com/Pebblo/a53a6f50782b2eb0312f2efae7a8401c

You can add that to a custom functions plugin, we have some documentation on creating one here:

https://eventespresso.com/wiki/create-site-specific-plugin-wordpress-site/

Does it work then?


AlphaStar

November 5, 2020 at 5:01 pm

This reply has been marked as private.


Tony

  • Support Staff

November 6, 2020 at 4:32 am

I have created and activated the plugin. I will let you know if it works.

You can test it by adding a registration to the event and not setting the Address 2 field.

Also, there is another issue with the integration. It automatically takes the student’s email and does not let us choose the parent email instead. Is there something we can do about it?

The add-on will always use the ‘Registrants’ email address and that’s the email address set in the Email question within the Personal Info question group, you can’t selectively change that out for another question on the registration form.

Can you link me to the event so I can view your setup?


AlphaStar

November 6, 2020 at 11:44 am

This reply has been marked as private.


AlphaStar

November 8, 2020 at 1:50 pm

This reply has been marked as private.


Tony

  • Support Staff

November 9, 2020 at 4:52 am

Here is the screenshot for the event-mailchimp setup.

Yeah so you have the ‘Personal Information’ question group as ‘Student Information’ and EE will always use the Email system question (which is set in the Personal Info group) for the subscription email.

Currently, there isn’t a way to change that.

The plugin we created is not changed anything. We are still getting the same error.

Just to confirm, you’ve checked the plugin is activated and not just installed, correct?

We recently had another user accidentally remove the closing multiple line comment */ which then basically commented out all of the code in the plugin, can you double-check the code is active? I’m not sure how comfortable with PHP you are but if you can add the plugin to say Pastebin and post the link I’ll confirm if need be.

Unfortunately, I can’t reproduce the error you are getting with the same setup.


AlphaStar

November 13, 2020 at 12:36 pm

Hello Tony,

I have fixed the php problems in the plugin, so it seems it is working now.

Thank you,


Tony

  • Support Staff

November 18, 2020 at 7:05 am

Hi there,

I’m glad it fixed the problem for you.

We are including a slightly different fix in the next version of the MailChimp add-on so that it allows empty strings and ‘falsey’ values (things like ‘0’). I’ve updated my gist with the same fix we’ll be using if you’d like to switch over to that and confirm it works.

The support post ‘EE Mailchimp Integration’ is closed to new replies.

Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.

Event Espresso