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.
Form save logic is treating optional lists as required lists when queueing user subscriptions. Attached patch will skip the step if roles have been added. Larger fix logic is needed, though, as we could still have this issue if roles are both added and removed simultaneously. mailchimp_lists_queue_existing needs to be more intelligent about adding in addition to using the queue system.
Comment | File | Size | Author |
---|---|---|---|
#7 | Screen Shot 2015-07-20 at 11.17.09 AM.png | 31.2 KB | BabaYaga64 |
#7 | Screen Shot 2015-07-20 at 11.17.20 AM.png | 61.13 KB | BabaYaga64 |
#7 | Screen Shot 2015-07-20 at 11.16.33 AM.png | 80.58 KB | BabaYaga64 |
fix_autosubscribe_logic_on_list_save.patch | 587 bytes | gcb | |
Comments
Comment #5
BabaYaga64 CreditAttribution: BabaYaga64 at ThinkShout, Drupal Association commentedI tried to reproduce this issue in 7.x-3.x but I wasn't able to. I also cannot find the mailchimp_lists_queue_existing function in the code. Is this patch out of date, or is there a way that I can help in making it work for the current MC version? Happy to help in any way I can.
Comment #6
gcbIt's a patch for the 2.x branch: 3.x is a whole different game (this issue has never appeared there).
Comment #7
BabaYaga64 CreditAttribution: BabaYaga64 at ThinkShout, Drupal Association commentedI tried reproducing this issue, but I was not able to get subscribers automatically added to optional lists, even when I set the batch processing subscription option and ran Cron manually. I also tested saving a new user without running the Cron batch processing option. I am running the MailChimp 7.x-2.x version and the only lists that users are automatically subscribed to are the required lists.
I noticed that after checking the "Sync List During Cron" checkbox while creating a new list, that an option appeared on my list display called "Queue existing". When I clicked this option link, I was taken to a page that asked me if I wanted to queue existing users to the list signup. I went ahead and selected this option, but my users were still not showing up as subscribed to the optional list, both before running Cron manually and after running Cron manually.
Here are screen shots of my lists, and my authenticated user, Fiona, whom I did not add to the optional lists, Waffles and Test List. After selecting the "queue existing" option for these lists, I expected Fiona to be automatically subscribed to both of these as per the issue, but she was not added.
Comment #8
BabaYaga64 CreditAttribution: BabaYaga64 at ThinkShout, Drupal Association commentedIt appears that this issue has been fixed with the following code, which has been added to the Drupal.org version of the MailChimp 7.x-2.x branch. (I was using an older version of the 7.x-2.x MailChimp branch, which didn't have this code, and thus couldn't reproduce the issue). Thank you to gcb for pointing this out :)