Closed (fixed)
Project:
Webform Mailchimp
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
16 Mar 2011 at 05:43 UTC
Updated:
3 Jan 2014 at 02:58 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
rcaracaus commentedthis doesn't work for me.. subscribe.. I need this to work for D7
Comment #2
dddbbb commentedI'd love to see this working for D7 too.
Comment #3
damienmckennaWill see if myself or cweagans can get to this in the next week or two, a client of ours needs it.
Comment #4
TimelessDomain commentedComment #5
rcaracaus commentedI ran the patch with the windows git application and it doesn't send to mailchimp.
Comment #6
carn1x commentedsubscribe
Comment #7
achandel commentedI have been using this module (after the patch) for some time. You can check it our here http://www.sensegrow.com. It has been working fine. It also sending the names etc. Please let me know if i can help anyone further with utilizing this module on Drupal 7.
Comment #8
achandel commentedI have upgraded the module to work with the following now:
MailChimp 7.x-2.1
Webform 7.x-3.13
Please find the new module attached. I have tested it and it is working fine. You can try this with latest version of Mailchimp and Webform module. Please let me know if there are issues in this release. I am not able to produce patch (some problem with my git installation). So i have attached the ZIP. Someone please upload the patch on my behalf.
Comment #9
steven1310-1 commentedHi achandel,
thanks for the module you posted.
But somehow I'm not getting it to work. Maybe I'm doing something wrong.
I think I made all the right settings.
I have created the webform field and it posts the data.
I have added the list from mailchimp to the webform field.
But the poster of the form is not added to the mailchimp mailing list that I provided.
Is there something I missed?
Thanks again.
Comment #10
Pedro Lozano commentedMoving back to Webform Mailchimp project so people don't create duplicate issues there.
Comment #11
Pedro Lozano commentedFixed the patch on the other issue.
I still have to look if @achandel's version has any improvement.
Left as needs works because there are still some things unported, but the subscriptions work.
Comment #12
Pedro Lozano commentedWrong patch in the previous comment.
Comment #13
lsolesen commentedWhat is the status of this. Do you need us to do anything?
Comment #14
blackdog commentedPatch does not apply.
Comment #15
Pedro Lozano commented@backlog the patch must be applied on 6.x-1.x with patch -p1
I did a reroll for your last commit and made some fixes.
Comment #16
blackdog commentedI can't get it to apply with either git apply or patch - p1.
But, reading the patch, this needs cleaning up:
Comment #17
basicmagic.net commentedsubscribe
Comment #18
dddbbb commented@basicmagic.net
Stop subscribing, start following: http://drupal.org/node/1306444
Comment #19
rcaracaus commentedIt is really frustrating that none of your modules work. I tried to debug them. No success. I tried the last patch 1094226-webform-mailchimp-d7-5.patch and it looked like it should of worked but wasnt subscribing the user.
Comment #20
Mattias Holmqvist commentedSeems like I have the same problem as rcaracaus.
However I used http://drupal.org/files/webform_mailchimp.zip linked to by achandel (#8).
The module seems to work as intended in Drupal.
I can choose a mailing list from my Mailchimp account to be used with the webform checkbox.
But the subscription is not accepted by Mailchimp for some reason.
All I can see is "1 New Subscribers" on Mailchimp's Dashboard page after submitting the webform. When I click on that email address I come to a 404 page and I still have 0 subscribers in my Mailchimp mailing list.
Comment #21
rcaracaus commentedI am fairly new to GIT and I wasn't applying the patch properly. This page was very helpful to get started. http://drupal.org/project/webform_mailchimp/git-instructions Now that I understand the process in patching etc I think I will be able to contribute much more. With these instructions I finally got the patch working from comment #15. You need to git clone the 6.x-1.x branch then apply the patch with 'git apply'
After playing for a long while and isolating the function that does the heavy lifting I was able to finally get my emails sending over to mailchimp. When this happened I knew I would be able to do whatever I needed.. eventually. Here is the important function:
mailchimp_subscribe_user($lists[$mailchimp_list], $email_address, $mergefields_replacements, TRUE, NULL);But in order for this to work you need to feed it an ENTITY. The mailchimp module is weird.. if you sift through the code there is a $list array and a $list entity.
This function wasn't returning any array for me, that is why it dodn't submit:
$lists = _mailchimp_get_available_lists($user);Maybe there was something going on when I was logged in or something. Not sure.
I changed that line to load the entity a different way:
$lists = entity_load('mailchimp_list', $list, $conditions, $reset);This will only interact with one mailchimp list FYI.
ALSO: You want to make sure the mailchimp_lists module is installed and that a list is created. This module should come with a readme file. I will write it if I end up figuring a little more out how this module works.
P.S. This module works GREAT when you get it working. The mergetag and interest functionality lets me do pretty much everything I need.
Comment #22
lsolesen commentedCould you write up some docs on how the interst fields work.
Comment #23
rcaracaus commentedYou need to create a Group with some subgroups in your Mailchimp account. Then you need to make a select field and map it to be the same name. I would use groups with one word.. not sure if spaces are handled properly. Check your Watchdog table for debugging.. or you can die the error directly in the mailchimp_subscribe_user function for testing.
Comment #24
arcanumxiii@gmail.com commentedShould be nice and all, but it seem some parameter are wreaking havoc : $conditions and $reset at line 132.
Now I know they are use by entity_load — i've tried with an empty array for conditions since it's deprecated, and a false for reset, but to no avail.
I would gladly accept some help on the matters.
Comment #25
lsolesen commentedWhat is the status for getting an alpha release for the 7.x module on its way?
Comment #26
lsolesen commentedHere is a patch that actually subscribes the user to the lists - and added a bunch of watchdog statements for debugging.
Comment #27
tabestan commentedI tried to apply the patch using http://drupal.org/project/webform_mailchimp/git-instructions and got the following error:
Comment #28
lsolesen commentedapplies to master not 6x
Comment #29
tabestan commentedThanks, it did the trick.
To add the component, I added an email field to my webform and choose that field as default. Small typo (subsribe instead of subscribe).
Comment #30
jnettikSo with the above patches is there a 7.x release on the horizon?
Comment #31
jnettikI just tested the patch out on a site I'm working on and it seemed to work for me. Though I there still is the above mentioned typo ;)
Comment #32
blackdog commentedOk, I've committed a functioning patch, based on the work in this issue. Thanks everyone!
It still needs a lot of testing. I'll create a dev-release which should be up soon.
Comment #33
jnettikSo I've actually stumbled upon a couple small notices while working on things. The first two occur when you submit a form that has an email field and the MailChimp field is tied to that email field, but you don't actually click the "Subscribe" checkbox for MailChimp. Basically in my use, I have a contact form where you can opt to sign up for the newsletter and if you do, it should use the email address field you provide in the form.
All I think we need is a check on the MailChimp field that will only run the code referenced if that checkbox is checked.
In light of the above notices, I opted to go with the option of having MailChimp field create the email field for me. I got the second notice below:
Easy enough to fix, just commented out line 211 defining the size of the text field.
Edit: Moved this over to it's own issue so as not to open up this one again. New issue is at #1415798: Notice: Undefined variable: email_address in webform_mailchimp_webform_submission_insert().