sepiariver / recaptchav2

Google's ReCaptcha V2 + V3 for MODX CMS: https://sepiariver.com/modx/recaptchav2-supports-recaptchav3/
https://sepiariver.com/
GNU General Public License v2.0
21 stars 15 forks source link

recaptcha not registering as checked #6

Closed izenn closed 8 years ago

izenn commented 8 years ago

I setup a formit form with recaptchav2 but i am constantly getting the error that i need to check the box. I did test with api v1 so i do know that my site/secret keys are proper.

here is my code:

[[!FormIt?
    &hooks=`recaptchav2,spam,email,redirect`
    &emailTpl=`mdx_contactemailchunk`
    &emailTo=`me@example.org`
    &emailUseFieldForSubject=`1`
    &redirectTo=`76`
    &validate=`
        name:required,
        email:email:required,
        subject:required,
        text:required:stripTags` 
]]

[[!+fi.error_message:notempty=`<p>[[!+fi.error_message]]</p>`]]

<form class="form" action="[[~[[*id]]]]" method="post">
    <input type="hidden" name="nospam:blank" value="" />
    <label for="name">
        Name: 
        <span class="error">[[!+fi.error.name]]</span>
    </label>
    <input id="name" type="text" style="border: 1px solid #888888;" name="name" value="[[!+fi.name]]" />

    <label for="email">
        Email:
        <span class="error">[[!+fi.error.email]]</span>
    </label>
    <input id="email" type="text" style="border: 1px solid #888888;" name="email" value="[[!+fi.email]]" />

    <label for="subject">
        Subject:
        <span class="error">[[!+fi.error.subject]]</span>
    </label>
    <input id="subject" type="text" style="border: 1px solid #888888;" name="subject" value="[[!+fi.subject]]" />

    <label for="text">
        Message:
        <span class="error">[[!+fi.error.text]]</span>
    </label>
    <textarea id="text" name="text" rows="7" cols="55">[[!+fi.text]]</textarea>

    <br class="clear" /> [[!recaptchav2_render]] [[!+fi.error.recaptchav2_error]] <br class="clear" />

    <div class="form-buttons"><input class="btn pricolor" type="submit" style="border: 1px solid #888888;" value="Send Contact Inquiry" /></div>
</form>
pyrographics commented 8 years ago

I'm getting this error as well. I recently upgraded it to 2.0.0.

pyrographics commented 8 years ago

Downgrading to 0.9.2 resolved the problem for me.

sepiariver commented 8 years ago

I recently found that there are some issues with the POST request method in the Google ReCaptcha library. I've changed the default request method to CurlPost in the latest version 2.0.2-rc1 commit https://github.com/sepiariver/recaptchav2/commit/cd078cd59dcffa50b76e0e4446c2dd91d242532d

Hopefully that should fix it. Seems that's what people are doing to get around that issue. Let me know if it resurfaces please.

madze commented 8 years ago

Hello! I am having the same issue as of 2.0.0

I've tried rolling back to 1.0.0 and am still having the same problem. Also, I can't find 0.9.2 anywhere...

I don't suppose 2.0.2 will be available in MODX extras anytime in the near future?

Thanks, awesome work!

visionscape commented 8 years ago

Hi, I'm also having the same problem - using 2.0.2-rc1. I have got the green tick to appear after selecting the matching images but when I click the send the page refreshes and displays a validation error for the control: "Please select the checkbox in the ReCaptcha image."

Hopefully you can advise what I should do - could this be something to do with testing on my local machine?

Cheers. Richard

matdave commented 8 years ago

Ditto, I have a 0.9.2 that I can downgrade to, but can confirm again that this issue is present. I tried the log, and it appears it's the response is empty. Something is not firing right somewhere.

matdave commented 8 years ago

Before reverting I did some digging, and it appears different environments need to post different ways. I tried SocketPost and it worked for this particular system.

DESIGNfromWITHIN commented 7 years ago

Any update on this? Have a pretty urgent issue like it: https://github.com/sepiariver/recaptchav2/issues/15