Please use the 7.x-2.x branch of this Module for Webform 4.x
The 7.x-1.x won't introduce support for Webform 4.x. However, both branches should have the same features.
Orignal Issue:
The Webform 4.x was created some time ago. It would be nice to keep up with its development.
Following page describes the necessary changes: Upgrading from Webform 3.x to 4.x
The only change so far this module is affected of is The $submission->values variable structure changed
.
Decision to make: I recommend to create dedicated branches of the module for 7.x-3.x and 7.x-4.x. I guess there will be other, more profound, changes in Webform 4.x branch which will make it harder to write backward compatible code. And maintaining a single branch for both versions could lead very quick to unmaintainable code.
However, I don't want and can't make a decision here :). Thus I've created two patches:
- Mixed-Mode
- Introduced a getter function which switches dynamically between the 3.x and 4.x data-structure. There's overhead but I don't think it's a show stopper.
- Dedicated branches
- Simply rewritten all
$submission->data[$key]['value'][0]
constructs.
Further both patches streamline the code to pass all the drupalcs sniffs.
Comments
Comment #1
blackdog CreditAttribution: blackdog commentedHey Peter,
I've created a new branch and pushed it. I have also given you Git access, so if you feel up to maintaining the 7.x-2.x branch, please go ahead!
I have not committed the patch, I'll leave that up to you.
Thanks!
Comment #2
das-peter CreditAttribution: das-peter commentedHey Hans,
thank you very much for your response and the git access.
Since we use the changes already in production without any problems, I decided to patch the 7.x-2.x.
Commit: http://drupalcode.org/project/webform_mailchimp.git/commit/5a5e09d
Cheers
Peter
Comment #3
Anonymous (not verified) CreditAttribution: Anonymous commentedJust applied this patch. Works great but fails when updating .info file:
S
Comment #4
areikiera CreditAttribution: areikiera commentedWould be awesome to extend this module's compatibility with Webform 4.x by making the MailChimp field available in the 'If' field in the conditionals. Would love to show groups only when the MailChimp field is checked.
Comment #5
ptmkenny CreditAttribution: ptmkenny commentedGreetings Peter,
If I want to use Webform Mailchimp with Webform 4 now, should I apply the patch or check out one of the git branches? I tried to checkout the 2.x-dev branch with git (in reference to #2) but drush couldn't find the branch.
Comment #6
ptmkenny CreditAttribution: ptmkenny commentedI re-rolled the webform_mailchimp-only-4.x-compatible.patch so that the hunk error described in #3 no longer occurs. Also, I updated the old default e-mail syntax (%useremail) to the 4.x syntax ([current-user:mail]).
Note: I'm relatively new to Drupal patching, so I created this with diff, not git. Let me know if I'm doing it wrong.
Comment #7
das-peter CreditAttribution: das-peter commented@ptmkenny Thanks fr re-rolling the patch. As far as I know only git patches are "supported" by the whole drupal.org environment - so it would be great if you could re-create it with git. If you need direction how to do this please have a look at Novice contributing 3: Create a patch or Making a Drupal patch with Git
Let's hope the actions here will bring the attention of the module maintainer so this goes into the official version soon :)
Comment #8
ptmkenny CreditAttribution: ptmkenny commentedOk, here's my attempt at a reroll in git.
Comment #9
das-peter CreditAttribution: das-peter commentedLooks like a proper git patch :) Let's hope the issue gets some attention now.
Comment #10
ptmkenny CreditAttribution: ptmkenny commentedPlease disregard patches #6 and #8. It looks like the webform_mailchimp-only-4.x-compatible.patch in the original post was already committed to the 2.x branch of this module. So, there is no need to reroll the patch. This is for the 2.x branch of the module.
(I assume 1.x = webform 3 and 2.x = webform 4)
Instead, e-mail token support needs to be updated, so I am attaching a patch that just adds e-mail token support for 4.x.
Comment #11
BenK CreditAttribution: BenK commentedI've tested out the patch in #10 to update e-mail tokens, but subscription to Mailchimp is not working if the user is an anonymous user. (Everything seems to work fine if the user is logged in.) I looked at the code, but not sure what is causing this problem. Ideas?
--Ben
Comment #12
das-peter CreditAttribution: das-peter commentedMeanwhile I realized I got some management permissions to this module - man I'm getting old, forgetting where I've which permissions already ;).
I created a 7.x-2.x-dev release, because that's indeed the branch that's compatible to Webform 4.x.
But I don't think there will be Webform 4.x compatibility in the 7.x-1.x branch.
Unfortunately I don't have the permission to edit the project page to document which branch has to be used for which Webform version.
Maybe I can ask blackdog for the permission.
It would be great of you Webform 4.x guys :D if you could test the 7.x-2.x-dev release and let me know if it works for you too. If so I'd say I'll create at least a proper beta release.
Comment #13
das-peter CreditAttribution: das-peter commentedAwesome, Hans already gave me the permission to edit the project page. I've added the required information and now we just need feedback if you guy's are happy with the 2.x branch to create a proper rc version.
Thus I set this to "needs review".
Comment #14
BenK CreditAttribution: BenK commented@das-peter: Thanks great news you've been able to update the project page and make a 7.x-2.x-dev branch.
Did you see the patch posted in #10 and my comments in #11?
Basically, the patch in #10 is required to make email addresses compatible with Webform 4.x, but the patch isn't fully working properly. It works great for authenticated users, but doesn't seem to work for anonymous users (the user is not being passed to Mailchimp).
Can you review the patch and see if there's a quick fix?
Thanks,
Ben
P.S. ptmkenny: I'd be interested to know if you have an idea for the anonymous user issue, too.
Comment #15
David Frohmader CreditAttribution: David Frohmader commentedWe also have need for the anonymous user issue to be fixed. Is anyone looking at this? Will it be fixed anytime soon? Without this ability we cannot increase our MailChimp subscribers other than manually. Ugh!
Comment #16
das-peter CreditAttribution: das-peter commentedI've realized (again) that I've commit permission ;) , so here we go: Committed and pushed #10: http://drupalcode.org/project/webform_mailchimp.git/commit/1f55e157b1e79...
Thanks for the patch!
And since I seem to have the permission to create releases too I've created a first beta release: https://drupal.org/node/2091019
Comment #17.0
(not verified) CreditAttribution: commentedAdded information about which branch to use with which Webform version.
Comment #18
amiller86 CreditAttribution: amiller86 commentedI am currently using webform mailchimp 7.x-2.0-beta1 and webform 7.x-4.0-rc3 and this issue does not appear to be resolved.
Any webform that I set with the mailchimp subscription box will not send the subscription to mailchimp and fails to load the destination url.
Please provide support on this issue.
Comment #19
amiller86 CreditAttribution: amiller86 commentedComment #20
das-peter CreditAttribution: das-peter commentedPlease provide sufficient information on the issue. Providing support based on this information is almost impossible.
Comment #21
amiller86 CreditAttribution: amiller86 commentedWell sadly I think I found the issue so this is probably I different issue than I thought. They recently released version 7.3.1 of the mailchimp module, and that seems to be what is causing the problem as all the other sites I have worked on are working fine with webform mailchimp 7.x-2.0-beta1 and webform 7.x-4.0-rc3.
Is there any plan to update webform mailchimp to handle Mailchimp 7.3.1?
Comment #22
adam_b CreditAttribution: adam_b commentedamiller86 - see #2301419: Support Mailchimp module 7.x-3.x branch
Comment #23
davidsickmiller CreditAttribution: davidsickmiller commentedThis was reopened for an unrelated issue; re-closing.