Installed this morning the latest version of Mailchimp (7.x-2.8). Now adding a campaign in Drupal throws an error:
"MailChimp error. The campaign was not saved. MailChimp error code: e, MailChimp error message: e."

The error code may vary, sometimes it states "MailChimp error code: 6" or "MailChimp error code: 7" or MailChimp error code: a"

Strangly enough in MailChimp the campaign is created...

Members fund testing for the Drupal project. Drupal Association Learn more


levelos’s picture

Status: Active » Closed (cannot reproduce)
Matt V.’s picture

Version: 7.x-2.8 » 7.x-2.x-dev
Status: Closed (cannot reproduce) » Active

I'm seeing the same issue using a fresh install of 7.x-2.x-dev. The only difference I'm seeing is that, in my case, the campaign is *NOT* getting created.

cvknl’s picture

Status: Active » Closed (fixed)

This morning i updated Mailchimp module to version 7.x-2.9 and the problem i had is fixed.

firfin’s picture

Status: Closed (fixed) » Active

Exactly same problem.
Libraries and mc api are correctly installed. At least no errors there and drupal status report says 1.3 version is installed. When I remove README version can't be determined, so that doesn't appear to be the problem.

I deactivated and uninstalled both the 2.9 and 7.x-2.8+4-dev (which seems to be 1 day older than 2.9? ) versions of the module. Clearing caches after every step. Also tried update.php multiple times which consistently says there are no updates.

I am glad that I tried updating on a test environment first :-) Long live best practices!
But unfortunately I still need a way to update the live site.

When I follow above procedure with the 2.7 version no problems arise. Everything works fine. So it seems to me the rest of the site configuration is okay. I have snapshot of virtual machines and am willing to try out any tips and help debugging.

Possibly some database setting that does not get cleared or updated properly?
Please advise.

Enxebre’s picture

Same problem since 7.x-2.9 update. Can´t save campaigns in Drupal but It create the campaign in Mailchimp.

"MailChimp error. The campaign was not saved. MailChimp error code: b, MailChimp error message: b."
the error message is different depending on the text format selected for "content sections".

Thank you.

firfin’s picture

Thanks for the heads up Enxebre. In my case the campaigns are also created and visible in the mailchimp dashboard. It is just the drupal end that seems to have problems.

MichaelP’s picture

20.65 KB

Using 7.x-2.9. Same story. No campaign created on mailchimp.

MichaelP’s picture

Correction: Campaign IS created on Mailchimp, sorry!

camilo.mejia’s picture

I'm having the same problem. I'm using this module and MCAPI.class.php to develop my own custom module. I tried the example code provided by mailchimp and I think the problem are not with this module, I think the problem is with the mailchimp api. $mcapi->campaignCreate doesn't return the campaign code.

camilo.mejia’s picture

I was wrong on my last message, the problem is not with mailchimp. I reverted to 2.7 and it's working fine.

Matt V.’s picture

Matt V.’s picture

Status: Active » Needs review
435 bytes

I'm attaching a patch that addresses the issue. The new MailChimp class was assuming that $return was an array, but when creating new campaigns $return is a string.

gcb’s picture

Good eye Matt V. -- we picked this up yesterday and rolled almost the exact same code into the dev branch (feel free to have a look), and you can get this on the dev roll from last night. We're doing extra testing and trying to work out some other issues before rolling into a recommended release.

Matt V.’s picture

@gcb Ah, I should have done a pull before rolling the patch. Then I would have noticed the fix.

That should mean that for anyone encountering this error, updating to the latest 7.x-2.x-dev should fix this issue.

gcb’s picture

Status: Needs review » Closed (fixed)
geidorei’s picture

hi done update but same issue.

firfin’s picture

@Matt V. & gcb : Thanks, dev version works for me now.

@geidorei: This patch seems to solve this specific problem. I suspect you might be experiencing another issue. Please check the issue queue for other similar problems or open a new issue for your problem. Thanks.