Closed (fixed)
Project:
Mailchimp
Version:
6.x-2.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
15 Jan 2010 at 02:40 UTC
Updated:
17 Dec 2010 at 20:43 UTC
If a user is logged in and tries to register either on their user profile or via an embedded block -- registration fails.
Comments
Comment #1
mpaler commentedby fails I mean, the screen just refreshes with no error or failure message.
Comment #2
mpaler commentedmore info...
error log is reporting:
Message You must specify a merge_vars value for the listSubscribe method
Comment #3
mpaler commentedCommenting out
around line 209 (function mailchimp_subscribe_auth_form_submit) in mailchimp.module appears to fix this...
Not sure the purpose of that line as registered users don't submit an email value...
Comment #4
levelos commentedThat line is there because a user can edit their email on the account edit screen. I can't replicate your error. Anything else relevant about your setup?
Comment #5
citizenpaul commentedI too am getting the same error (log reports 'You must specify a merge_vars value for the listSubscribe method') using 6.x-2.0-rc4. Upon installing the module as the admin user in Drupal, the subscription box on my website was ticked (both my Drupal site admin account and the MailChimp admin account have the same email address). In testing the module, I unticked the list subscription box on my Drupal profile page and now am unable to add myself back to the list. When I re-tick the box and submit the form (whether on my 'profile edit' page or in the subscribe block) the page re-loads but I cannot get the box to stay ticked. I've tried adding my address back to the list from within the MailChimp user area, but get '...has unsubscribed, and cannot be resubscribed by you. To prevent false spam complaints, they'll need to resubscribe of their own free will.'
Does this help?
Thanks
Paul
Comment #6
levelos commentedI just rechecked this scenario with the latest 2.x-dev branch and everything works as it should. Can you please try the latest code and see if you still have a problem. Perhaps it could be a setting within your MC list. citizenpaul, is there anything in your error log?
Comment #7
mightyulysses commentedI'm having the same issue, my Mailchimp is configured as an opt-out list. Once a user is logged in they can unsubsribe but cannot subscribe. My mailchimp subscription settings page does not print an email form. As mpaler pointed out the following line is the issue:
$merge_vars['EMAIL'] = $form_state['values']['mail'];So instead of getting the email from the form should it not get it from the user object?
Which brings me on to the next question, if a user does change their email address does the module unscubscribe their old email and subscribe their new email?
Comment #8
clarkburbidge commentedI can confirm this with 6.x-2.0-rc4 & with 6.x-2.0-dev.
Creating two profile fields for First Name and Last Name and mapping them to the respective fields for my list allowed me to add a user to the list.I'm a liar!I'm still having problems adding users on their profile page and from the subscription block but only for registered users....
While it is nice to have the name fields mapped I don't think it should necessarily be a requirement for subscription.Comment #9
bkjproductions commentedIt does seem that if you do NOT have the profile fields checked, then it will not work for registered members.
Unfortunately, we're not using the profile fields. Instead we're using Profile Content, which doesn't get listed in the MailChimp module. It would be good if it used the Profile Content Type fields. For now we're just sticking in the username and id for first and last names, which is not optimal, but at least then Mailchimp works.
Comment #10
chrisloos commentedI'm having the same issue here. Users can check the box to sign up for a mailing list on the registration screen, but if the they try from the user edit screen, the box is unchecked again after they click the 'save settings' button.
Unchecking the checkbox on the user edit screen seems to work. In other words, if user is already signed up for the mailing list, then unchecks the subscribe box on their edit user screen, then clicks 'save settings', the box will be unchecked after the page reloads. But they are then unable to re-subscribe.
Using 6.x-2.0-rc4.
Comment #11
stevenghines commentedI just tried this with the latest dev version of the code (6.x-2.x-dev from 2010-May-05) and the advice given in #3 worked for me (i.e. a registered user can subscribe to and unsubscribe from a mailchimp list by checking / unchecking the checkbox on the /user/USER_ID/mailchimp page.
However, subscription using the registration form now does not work. Also, no error is written in the drupal error logs. On my user page I am also displaying content from the legal and captcha modules.
I proceeded to uninstall the dev version of the module and install 6.x-2.0-rc4. I then reconfigured it on /admin/settings/mailchimp to point at my mailchimp account (opt-in list available to both anonymous and authenticated users). Subscription to my mailchimp list during user registration still did not work, neither did subscribing from the user edit page. The "You must specify a merge_vars value for the listSubscribe method" error was written in the error logs.
Next step was to comment out the same line of code as suggested in #3 in the 6.x-2.0-rc4 version of the module. I got the same results as with the dev version of the code (i.e. user registration doesn't work for subscribing and no error message, user edit does work for subscribing / unsubscribing).
Next test was to try setting first name and last name in /admin/settings/mailchimp both to the username. Same results as above.
So, in summary, subscription to a mailchimp list never works when a user registers, and only works when a user edits their profile when the code as mentioned in #3 is commented out.
Anonymous subscription at /mailchimp/subscribe seems to work well.
Hope this helps.
Comment #12
stevenghines commentedComment #13
stevenghines commentedAfter further investigation, it appears that my comment in #11 may be misleading. It turns out that the Login Destination module was causing the problems I described, and not the MailChimp module. The Login Destination implementation of hook user was getting executed before the mailchimp_subscribe_auth_form_submit submit handler was being executed. This explains why the mailchimp module appeared to be working for logged in or authenticated users, but failed when the state of a user transitioned from anonymous to logged in.
I have made a comment in #761254: not working with content profile module ? to address this with the Login Redirect maintainers.
Comment #14
levelos commentedComment #15
mpaler commentedcould this be address with Module weights?
Comment #16
levelos commentedJust committed a change to the latest dev release which, at least in some cases, could lead to this issue. The MC API didn't like getting an empty array as a merge_vars parameter, preferring an empty string. Don't figure.
Comment #18
Exploratus commentedsubscribe