I am setting hidden groups for members in Mailchimp. I have a Mailchimp Subscription field on my Drupal user accounts. If the user edits his account, those hidden groups are removed in Mailchimp.

I've tried checking "Enable Interest Groups" but that does not make any difference. (It does make my visible Interest Groups available, but does not fix this issue.)

Is there a way to ensure the Mailchimp Subscription field does not remove groups that may not be available or visible on the user account page?

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

MrPeanut created an issue. See original summary.

dmsmidt’s picture

Version: 7.x-3.x-dev » 7.x-3.6
Priority: Normal » Critical

I can confirm this is a problem in 3.6. This is serious since it corrupts your data at the mailchimp side.

dmsmidt’s picture

Version: 7.x-3.6 » 7.x-3.x-dev
Status: Active » Needs review
FileSize
810 bytes

Here is a patch that fixes it.

ruscoe’s picture

Status: Needs review » Closed (won't fix)

We're going to be ending support for the 7.x-3.x branch due to the upcoming deprecation of the v2.0 MailChimp API. If you're still seeing this issue with the most recent release, please feel free to reopen.

dmsmidt’s picture

Version: 7.x-3.x-dev » 7.x-4.x-dev
Priority: Critical » Major
Status: Closed (won't fix) » Needs work

This is still an issue on the 7.x-4.x branch.

sjerdo’s picture

Updated the patch for version 7.x-4.x

sjerdo’s picture

Status: Needs work » Needs review
heylookalive’s picture

Looks good to me!

samuel.mortenson’s picture

Version: 7.x-4.x-dev » 7.x-5.x-dev
FileSize
929 bytes

Here's a re-rolled patch for 7.x-5.x, if anyone in the community could review and mark the issue as RTBC (if the code looks good and works), that would help to get this in. Thanks!

amandahart’s picture

I applied this patch on a site that is using custom module code to update the Mailchimp member values for a hidden interest group. Before applying this patch, I could not get data from the hidden interest group. The value of $exclude_hidden was not being used to decide whether or not the interest group would be included. This patch fixes that and removes the hard-coded "hidden" value. I can now see my hidden interest group when calling mailchimp_get_list() and specifying FALSE for $exclude_hidden_interest_groups.

I'm not certain if this fixes the issue the original poster reported, but it does use the $exclude_hidden_interest_groups/$exclude_hidden value correctly to decide what is included.

vasike’s picture

Component: Lists » General
Status: Needs review » Needs work

i would say this is a duplicate of https://www.drupal.org/project/mailchimp/issues/3122931

And the "solution suggested" there seems "more correct this one ...