When an email address is changed the Mailchimp module uses the new email address as it's identifier. This new email address most likely does not exist in the list yet resulting in the "new subscriber" procedure to kick in and leaving the old subscription for what it is. This behaviour pollutes the list and forces the subscriber do another opt-in.

The included patch uses the original e-mail address as identifier if it exists and the update is performed normally. There are no options to send out an email change confirmation mail (yet).

CommentFileSizeAuthor
#1 email_update-2323853.patch828 byteskarel010

Comments

karel010’s picture

StatusFileSize
new828 bytes
karel010’s picture

Assigned: Unassigned » karel010
Status: Active » Needs review

Status: Needs review » Needs work

The last submitted patch, 1: email_update-2323853.patch, failed testing.

karel010’s picture

Can someone please take a look at this? If there is any reason this patch is not to be accepted please tell me what needs to be changed.

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 1: email_update-2323853.patch, failed testing.

karel010’s picture

Version: 7.x-3.1 » 7.x-3.2
Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch, 1: email_update-2323853.patch, failed testing.

Status: Needs work » Needs review

ruscoe queued 1: email_update-2323853.patch for re-testing.

ruscoe’s picture

@karel010 The test failures were an issue with the module that has since been fixed. I'm taking a look at your patch now.

palagpatski’s picture

Hello, what's the status in this issue?

karel010’s picture

@palagpatski Unfortunately I seem to be the only one who has tested it. Would have thought more people to have this problem. It works stable in our production environment since August. However I have only tested it in our specific set-up and it would be great if you could add your experience with the patch.

palagpatski’s picture

OK. What I am trying to do is to filter user's email addresses. When the user registers to the site, it will automatically subscribe/unsubscribe to the Mailchimp list depending on the email's domain. Mailchimp 3.x uses Rules to do that, right?

Now what happens is that when I change the email address of the user, Mailchimp adds this new email to the list, instead of replacing the old one. The user then has two emails subscribed to the list. Is this the same problem you're dealing with?

The patch didn't help, unfortunately. What it does, though, is unsubscribe the previous emails associated with the user when he email is changed to the unacceptable domain, which is what we want, and which the Mailchimp Rules fails to do.

karel010’s picture

@palagpatski

The user then has two emails subscribed to the list. Is this the same problem you're dealing with?

Yes this is exactly the problem I am dealing with. It is not however related to what you are trying to accomplish. I think your rules are broken. With or without the patch you will need two rules and it should just work for you. One to subscribe for the desired domains and one to unsubscribe for the undesired domains. Make sure the rules are triggered post save.

The patch should not do anything with subscribing or unsubscribing. It should just send a change set with the new e-mail address to the mailchimp API. Mailchimp itself should just change the e-mail address for you. This means that even if your rule fails it still only has one e-mail address on the list instead of two.

  • ruscoe committed 365753d on 7.x-3.x authored by karel010
    Issue #2323853 by karel010: Changing emailaddress results in multiple...
ruscoe’s picture

Tested and works as intended; committed to dev branch. Thanks for the patch and sorry for the delay in getting it merged.

ruscoe’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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

drumm’s picture

I'm running into this with our implementation on Drupal.org. Since this causes unintended subscriptions, I think it is worth making a 7.x-3.3 release.

torsti’s picture

Status: Closed (fixed) » Needs work

I'm having this problem also. Our members are regularly updating their personal info to our web site and if a user changes his email address, it is added as a new subscriber to Mailchimp. This is not an expected behaviour and it causes us a lot of extra work.

All other fields are updated ok to Mailchimp.

Our site is using the latest 7.x-3.x dev of Mailchimp module as well as the latest 2.0.6 of the Mailchimp API library.

Any chance to get this fixed?

  • ruscoe committed 365753d on 7.x-4.x authored by karel010
    Issue #2323853 by karel010: Changing emailaddress results in multiple...

  • ruscoe committed 365753d on 8.x-1.x authored by karel010
    Issue #2323853 by karel010: Changing emailaddress results in multiple...
ruscoe’s picture

Version: 7.x-3.2 » 7.x-4.x-dev
Status: Needs work » Closed (won't fix)

Moving to 7.x-4.x as 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 and this issue still applies.