reCAPTCHA validation does not work and POST button remains disabled
-
I installed this plugin today and had a problem where after checking the “I’m not a Robot” box, or validating the image question the “POST” button in my WordPress comments form would remain ‘disabled’.
Debugging showed that the json response returned error “invalid-json”. I did some research and came across this issue in the github repository for google’s reCaptcha: https://github.com/google/recaptcha/issues/359 . There they explained there was a change few months back in the response from Google. The same post points a workaround which is to use ‘CurlPost’ instead of ‘SocketPost’.
I’m not sure why I was blessed with this issue, but after a while trying to figure out where to make this change I realized it can be done by updating line 183 of file …/includes/recaptcha.php:
From:
$reCaptcha = new \ReCaptcha\ReCaptcha($secret);To:
$reCaptcha = new \ReCaptcha\ReCaptcha($secret, new \ReCaptcha\RequestMethod\CurlPost());This plugin appears to be working for me now and the Post button in my comments section is disabled after the verification is complete.
I hope this is of some use to you in case you find similar issue.
- The topic ‘reCAPTCHA validation does not work and POST button remains disabled’ is closed to new replies.