The ReCaptcha module in a webform is not working correctly when Clientside Validation is enabled. The webform will not submit and an error "Wrong answer for captcha" is displayed even though "I'm not a robot" is checked.
CAPTCHA 7.x-1.4
reCAPTCHA 7.x-2.2
Clientside Validation 7.x-1.44
Webform 7.x-4.15
When checking the recent log messages, 4 php errors appear.
php 2017-05-24 09:05 Warning: Missing argument 4 for recaptcha_captcha... Anonymous (not verified)
php 2017-05-24 09:05 Warning: Missing argument 3 for recaptcha_captcha... Anonymous (not verified)
php 2017-05-24 09:05 Warning: Missing argument 4 for recaptcha_captcha... Anonymous (not verified)
php 2017-05-24 09:05 Warning: Missing argument 3 for recaptcha_captcha... Anonymous (not verified)
Clicking on the LOCATION link I get:
{"result":false,"message":"CAPTCHA validation error: unknown CAPTCHA session ID. Contact the site administrator if this problem persists."}
The message is Warning:
Missing argument 4 for recaptcha_captcha_validation(), called in /.../sites/all/modules/clientside_validation/clientside_validation.module on line 239 and defined in recaptcha_captcha_validation() (line 144 of /.../sites/all/modules/recaptcha/recaptcha.module).
Comment | File | Size | Author |
---|---|---|---|
#2 | add-recaptcha-cv-js-2881024.patch | 1.33 KB | Clemens Sahs |
Screen Shot 2017-05-24 at 9.05.37 AM.png | 113.5 KB | plinto |
Comments
Comment #2
Clemens Sahs CreditAttribution: Clemens Sahs as a volunteer commentedThis patch help my.
Comment #3
plinto CreditAttribution: plinto commentedWith the patch, clientside validation works correctly; the form submits when checked and displays an error message when not checked.
However, when the captcha is not checked and submit is pressed, the php error messages appear in the recent log messages.
Comment #4
hugronaphor CreditAttribution: hugronaphor as a volunteer and at Acrosto commentedIn my case I found this patch needed for the following case:
- User submits the form without clicking the captcha checkbox to pass the verification;
- The error is shown;
- Clicking/Passing verification;
- Submitting the form still says "Wrong answer for captcha".