Perhaps I'm jumping to conclusions, but it seems that the module is getting my lists fine from the MailChimp API, but not signing up users to the list when they check the box on the user/register page. It works fine when I edit my profile and subscribe from there. I've tried opt-in, opt-out, with cron and without, and none of them work.

I'm using Autoassign Role to allow users to select their role on sign-up, and Rules to redirect them after they do, based on role. I've opened up the list to all roles. Also using LoginToboggan, but could probably turn it off if it's messing with things.

Happy to provide any more information.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

mkeplinger’s picture

I am having the same problem. But not using Login Toboggan nor Rules. Just simply using the opt-out feature, but they do not show up on MailChimp.
If I manage the subscription via the "Newsletter Subscriptions" tab then it will successfully subscribe, but not automatically with the opt-out setting.

rayray’s picture

Same problem here. I'm using LoginToboggan but no rules. Users can't actually edit their profile page that has the MailChimp checkbox. Specifically, if it's checked, things work okay... but if they un-check and submit, it can never be checked again! If you check it then, and submit the form, it appears to be un-checked.

Also, as of two months ago, it appears that new users were no longer being added. At that time, I did maintenance on the site, and probably had upgraded the module.

I just upgraded to 6-2.2 but it doesn't seem to help anything.

xrampage16’s picture

I was having the same issue, but my issue stemmed from the fact that no one could sign up no matter what. Newsletter page, or User Registration page.

After doing a couple of var_dumps inside of the api file itself, and narrowing down the $result not being passed back as finished inside of callServer, I found out that the error for my particular situation is that a required field was not passed information.

If your mailing list has required fields, you are going to have to make sure that on the mailchimp settings page that the required fields match up with something. If not, then an error will be thrown.

I recommendation is that if this particular error is thrown, than an error is added to watchdog describing the error, or possibly in the validate action of the mailchimp settings page, that whatever mailing list is chosen, then it loads whether or not the fields are required, and if a select is set to "none", that it fails validation, and sends the admin back to the page explaining that they need to add a setting.

xrampage16’s picture

please delete

xrampage16’s picture

Since the problem with the latest version of mailchimp (at least in my situation) stems from attempting to submit null information for a required mergevar which is set inside of mailchimp, I've made a change to the validate method in mailchimp.admin.inc to see if the required attribute has been set for a mergevar, and if so, make sure that is not set from the drop down list.

If is selected, and the mergevar is required, a form_set_error will be called, and FALSE will be returned after all the other newsletters have been checked for a similar error.

This patch will warn the admin that their selections will fail if not rectified, and will hopefully prevent confusion in the future.

*WARNING*
After a bit of testing, I was unable to set the exact field item to be displayed as red in form_set_error, but I left some comments as to the reason why. I would appreciate if someone could fix that, or point out my error, and I'll post an updated patch with this fix.

levelos’s picture

Status: Active » Needs review

xrampage16 - Thanks very much for the patch. I took a different, I think more efficient approach. Basically setting the merge fields as required on the admin form based on the merge tags required flag. You can take a look in http://drupal.org/cvs?commit=448728.

Not, I'm not sure if this is the cause of the error other users are seeing. Please test and let me know.

levelos’s picture

I believe that this issue is resolve with these two recent commits:
http://drupal.org/cvs?commit=452682
http://drupal.org/cvs?commit=452686

Would appreciate any testing/confirmation. Thanks.

levelos’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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