Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
offshot from #1307222: provide rules integration to care for d7 specifically
* condition: User is subscribed to a list
* action: Subscribe user to a list
* action: Unsubscribe user from a list
Comment | File | Size | Author |
---|---|---|---|
#6 | mailchimp_lists_mail_subscribe_list.patch | 1.77 KB | mh86 |
#1 | mailchimp_lists_rules.patch | 3.4 KB | fago |
Comments
Comment #1
fagoand the patch..
Comment #2
levelos CreditAttribution: levelos commentedThanks @fago. Also added the new rules file to .info.
Comment #3
klausi@levelos: No need to add the file to the info file, this is only needed for files containing classes/interfaces. See http://drupal.org/node/542202
This is also detected by drupalcs, see http://ventral.org/pareview/httpgitdrupalorgprojectmailchimpgit
Comment #4
chris23 CreditAttribution: chris23 commentedWhat about subscribing a user to a particular group within a list?
Comment #5
levelos CreditAttribution: levelos commentedThanks @klausi, got it.
Comment #6
mh86 CreditAttribution: mh86 commentedThe current action for subscribing an email takes the user as argument. In some certain cases you might have an email address, but the user is anonymous (e.g. you add a user to a mailchimp list when he starts with an order checkout as anonymous user).
So I thought about adding another action that simply takes the mail address as input. Compared to the existing subscription action, no merge fields are supported. I hope the approach of having 2 actions is not too confusing to people, but both have their use cases. What do you think about it?
Comment #7
Lloyd CreditAttribution: Lloyd commentedWhat value needs to be entered as the Mailchimp list identifier? I tried using the number of the list in Drupal (e.g. 1, 2, 3), as well as the name (e.g. general_mailing_list). Neither seem to work.
Comment #8
Lloyd CreditAttribution: Lloyd commentedOkay, question answered but it brought up a potential issue.
The answer to my above question is that "general_mailing_list" (whatever the machine readable list is called in Drupal) is correct.
It didn't work for me because to test it I went in to Mailchimp (directly, not through Drupal) and unsubscribed. Because the Mailchimp module in Drupal thought I was subscribed it did not send the subscription request to Mailchimp.
Comment #9
jt55401 CreditAttribution: jt55401 commentedI am able to successfully get the rules working to SUBSCRIBE a user, but unsubscribe does not work for me.
For reference, here is my SUBSCRIBE rule, it works fine:
Here is my UNSUBSCRIBE rule, it does NOT work:
Comment #10
levelos CreditAttribution: levelos commented@mh86, if you want to add that as a feature, please create a new feature request for it so we can track more granularly.
@jt55401, if you find a bug that you can replicated, post as a separate bug report.