Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin fails if Enable reCAPTCHA is enabled #15

Open
mikelax opened this issue Jun 23, 2018 · 5 comments
Open

Plugin fails if Enable reCAPTCHA is enabled #15

mikelax opened this issue Jun 23, 2018 · 5 comments

Comments

@mikelax
Copy link
Contributor

mikelax commented Jun 23, 2018

Overview

If you have a mailing list with the setting for Enable reCAPTCHA turned on, publishing to the list will fail with the error message: captcha.

To get things working I turned off this setting, but it would be nice to have an option for having this feature enabled. I am not exactly sure of the best course of action to get this resolved. At a minimum, the README should be updated to document this issue.

It would be nice to have the option to using this feature within this plugin, if their API supports it then it should be added.

@benjaminhoffman
Copy link
Owner

looking into this.

@benjaminhoffman
Copy link
Owner

Thanks for pointing this out @mikelax

I don't know if the Mailchimp API allows it. I can look into this.

In the meantime, got a moment to open a PR updating the README? I can merge this week.

@mikelax
Copy link
Contributor Author

mikelax commented Jul 20, 2018

@benjaminhoffman sure will do. do you first want to merge #16 ?

@benjaminhoffman
Copy link
Owner

not sure if there is any way around this. open to suggestions.

@fantapop
Copy link

fantapop commented Oct 27, 2018

I fell into this issue as well. I think I have a work around which could potentially be integrated into the plugin. If I receive "captcha" back as the error, I manually build the URL for the popup window that is triggered in the normal mailchimp embedded form case. I can then open that popup and successfully fulfill the captcha and sign up the user. It's not a great user experience since they need to allow popups but its no worse than using that captcha otherwise. You may be able to load the url in an iframe on the page and allow the user to finish the flow there. The url for the pop up looks like this:

const { result, msg, params } = await addToMailchimp(this.state.email);
if (msg === 'captcha') {
    window.open(`https://<same domain used in plugin config>/subscribe/post?u=${params.u}&id=${params.id}&EMAIL=${encodeURIComponent(params.EMAIL)});
}

I haven't tried it with any of the additional fields that can be passed along as listFields but I expect they could be handled similarly.

EDIT:

I see the url is pretty much exactly the same one as I configured the plugin with. I'm not sure if doing it this way, cancels out some of the point of having the plugin if we know we have the captcha enabled, we could just open that url in a popup on form submit instead of calling addToMailchimp()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants