-
Notifications
You must be signed in to change notification settings - Fork 37
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Captcha could not be validated. #8
Comments
Have you checked that the site key and secret key are correct? Are you using Ajax to submit the form? Also double check that you have authorized the domain on google's end. |
Site Key and Secret Key are correct. Silverstripe UserForms is being used, so just standard submit. |
I wonder is there client side validation happening per chance from user forms? I'm wondering if that maybe a clue, I'll do some testing on the weekend. It could be seeing it as required and validating it. |
Yea, I assumed that the userform wasnt getting the correct response. |
Ya if it's doing client side validation it maybe capturing the submit event which is likely preventing googles code from populating the value needed for the server side validation. You could try turning off the client side validation in the user forms settings. It may help. I'll do some testing on the weekend see if I can figure it out, what version of user forms are you using? |
I just tested with the latest master of userforms and 3.1.12 as well as the latest master of this module. Which is the same as the 0.1.3 tag with the exception of some documentation changes. It seemed to work correctly for me, can you post your composer.lock file? |
Hi UndefinedOffset, I have manually copied all files (not using Composer). Is this likely to be the Keys I have entered, or Userforms trying to validate the Nocaptcha field? |
My guess would be that the domain you are using is not allowed for the keys you have setup. Make sure you have allowed the domain you are working off in googles recaptcha panel for the keys. |
Also try var dumping the response variable before this line https://github.com/UndefinedOffset/silverstripe-nocaptcha/blob/master/code/NocaptchaField.php#L141 also try dumping out curl_error($ch), may need to check that function name to be sure I'm right ;). Could be an error too |
I believe the keys are working without any issue, If I swap them out for a different domain, it shows an error, something about the keys are not for this domian". Think we solved the problem. Our servers dont have SSL, so CURL needed to have verify set to false. |
Ok cool you can set that on the config for the field (see the read me) for that, that way you won't have to modify the module :) let me know if the problem is solved and I'll close this issue |
All solved. |
After submitting form, an error shows under the nocatcha "Captcha could not be validated."
Form is then not submitted.
Silverstripe 3.1
The text was updated successfully, but these errors were encountered: