When I first input my account details in the settings, I get this error:

warning: Invalid argument supplied for foreach() in /sites/all/modules/mailchimp/mailchimp.module on line 513.

I am able to see my lists and set them up and when I save the error goes aways.

When updating the user profile it doesn't remember any of the list groups that have been selected nor does it pass any of the Merged fields data to Mailchimp.

Comments

levelos’s picture

The first part of your report is a indeed a bug which I fixed, thanks.

As for the data no passing through, can you provide some more details? E.g., what are the exact settings, list types, etc. Thanks.

In general, you should only report only bug per issue and have a more meaningful title than "does not seem to work". Remember, this is all volunteer efforts, and we need to work together to make it better!

marcus178’s picture

Title: Does not seem to work » User profile not syncing with mailchimp

Sorry I thought the issues maybe related. I've amended the title so that it's more relevant to the second issue as you've fixed the first one.

I have 1 list assigned to authenticated user role and subscription method opt-out

I also have some merge fields, but I've had them set to merge and none but neither seems to make a difference as not even the interest groups are syncing.

The following are also ticked:
Show Subscription Options on User Registration Page
Show Subscription Options on User Edit Screen
Show Interest Groups on Registration and Account Forms

If you go to edit the profile and select an interest group and save the screen refreshes and the selection is not ticked and if I check mailchimp the information has not been updated. I've also tried adding a new account. The information from registration does get passed to mailchimp including interest groups, but as soon as you edit the profile as interest group is not selected. Also you cannot unsubscribe from the list. Unticking the box and saving has no effect, after saving it is still selected.

marcus178’s picture

OK I've just noticed something which is why it's not working. For my user profiles I have the standard account tab and a Personal Information tab. The newsletter subscription option appears on both, but only the account page gets the right information. Also the information is only getting passed to Mailchimp if save is selected on the Account page. Selecting save on my Personal Info tab has no effect.

levelos’s picture

Status: Active » Fixed

Yep, I found that, and the root cause of the problem. It's now fixed in the dev release. I'm working on another update and will release a new beta in the next day or two. Please continue testing, it's appreciate and the best way to get this thing polished up.

marcus178’s picture

Thanks for your quick response and I can see you released an update. I have installed this but I'm still having problems. It now only appears on the account tab which is fine, but my merge fields are on another tab within the profile and saving that tab doesn't pass anything to mailchimp, you still have to go to the account tab and save to pass the fields, which may not happen if a user updates this tab and then goes somewhere else on the site.

I'm guessing if I change the settings so it updates on cron I will overcome this problem, however I have tried this and it doesn't update on cron.

levelos’s picture

I'm aware of that lingering problem, but don't have a solution off hand. If you make your list "required" than the updates are all triggered via hook_user. Optional newsletters couldn't be triggered that way as updates were happening unintentionally, and there were several issues discussing the problem. So I created separate submit handlers for the optional newsletters.

Suggestions welcome.

Status: Fixed » Closed (fixed)

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

marcus178’s picture

Status: Closed (fixed) » Active

I think I've a way round this problem by using http://drupal.org/project/onepageprofile so that you edit your profile all on one page

levelos’s picture

Status: Active » Fixed

I resolved this by moving the subscription forms OUT of the actual account form and into their own tab when editing a profile. Code is available in the latest dev release.

marcus178’s picture

Hello

I was using the one page profile which seemed to work well as there was only one page to save and all the data got sent to Mailchimp. Now that it's on it's own tab the same problem has come back. If a user updates their details the new information is only passed to mailchimp by going to the mailchimp tab and saving.

Status: Fixed » Closed (fixed)

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

Chad_Dupuis’s picture

Version: 6.x-2.0-beta5 » 6.x-2.0
Status: Closed (fixed) » Active

I'll second this bug report. Since 2.x Mailchimp no longer works with one page profile which was a great solution - not just for mailchimp issues but just for the profile generally. I'm still running one page profile but mailchimp will only show up in it's own tab. I would like to see mailchimp return to using standard api calls so that one page profile will work...

levelos’s picture

Status: Active » Closed (fixed)

Required newsletters are all handled via hook_user() (standard API calls?), but opt-in / opt-out newsletters are presented in subscription forms in either the profile pages, blocks, or standalone sign up forms.