Extension

Developer
Supported

reCAPTCHA v2

ExpressionEngine 1.x, ExpressionEngine 2, ExpressionEngine 3, ExpressionEngine 4, ExpressionEngine 5

Back to this add-on's main page
View Other Add-ons From Denik

     

You must be logged in to post.

Setup isn’t working

Bug Report

srevoal
srevoal

I’ve created and added the API keys and setup the template as described in the README. But when rendered in the frontend, I get only

<div class="g-recaptcha"></div

in the form and no script snippet in the <head>. As a result, I’m getting: “Captcha error (The response parameter is missing)” on submit.

Denik
# 1
Developer
Denik

Hello,
Please tell me what is your ExpressionEngine version?

When param “Auto append reCAPTCHAv2 script” is set to “Add before closing tag </head>” in Extension settings.
The extension requires that the closing tag itself be present in the source HTML code.

Try to set “Auto append reCAPTCHAv2 script” to “Do not add script (manual variant)” and include script by manual via “{recaptcha:script:html}” variable in your template.

srevoal
# 2
srevoal

EE 4.3.0

Your solution works in getting the Google CAPTCHA to show up on the normal templates - however, even we I pass the CAPTCHA and get a check mark, the form doesn’t submit. It reloads and clears all the fields.

Also, the {recaptcha:script:html} tag does not parse in the Member Templates. So it’s not working for the Member Account Registration Form.

Thanks!

Denik
# 3
Developer
Denik

Hello,

For the user templates, - it was a bug, but it is already fixed in the new version. Try to upgrade to version 1.0.4.

...even we I pass the CAPTCHA and get a check mark, the form doesn’t submit. It reloads and clears all the fields

I did not undestand you, can you describe the problem in more detail?

srevoal
# 4
srevoal

The {recaptcha:script:html} tag still doesn’t parse in the Member templates after upgrading to 1.0.4.


For a form in the normal templates, where the script does show up correctly:
When I submit the form with the CAPTCHA, either passed or not, I get the following error: “captcha_word: A captcha image is required in order to register.” Have you encountered that kind of error before?

Denik
# 5
Developer
Denik

Hello,
Please check the follow:
1. Maybe you disabled extensions? https://docs.expressionengine.com/latest/general/system_configuration_overrides.html#allow-extensions
2. Disable any other captcha extensions.
3. Check your JavaScript code on conflicts with reCaptcha scripts.

If this does not help, then I’ll need to take a look myself. Please send SuperAdmin and FTP login credentials to hi at eecoding dot com if you can.

srevoal
# 6
srevoal

Those didn’t do anything for me. I’ll send you the creds via email.

Denik
# 7
Developer
Denik

Hello,

I received your access creds.
After studying the problem, I came to the conclusion that the expansion has nothing to do with this error.

You have some problem with setting up a CDN route.
More precisely - I see different IP addresses for GET / POST requests (I sent the details in screenshots by mail).

I made a “fast fix” using PHP to solve this problem (in the file ext.recaptchav2.php). And recaptcha-extension work fine for me now.

I recommend to you find out why IP is different and fix it (maybe it’s CloudFlare settings, maybe the Apache module settings).

Best regards.