Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

google reCaptcha not rendering

Tags:

recaptcha

I'm trying to render google reCaptcha on my site. I went to google reCaptcha admin, set a label, and added two domains: one is localhost, and another is mydomain.com.

I followed the instructions and added a script tag before the closing head element:

<script src="https://www.google.com/recaptcha/api.js"></script>

At the bottom of my form, I added the reCaptcha div:

 <div class="g-recaptcha" data-sitekey="MY_SITE_KEY"></div>

It's been over 30 minutes, and the reCaptcha isn't rendering neither on localhost, nor on mydomain.com. The developers console in the browser doesn't show any errors. What could be the problem?

Thanks.

like image 327
Mister_L Avatar asked Jan 05 '17 10:01

Mister_L


People also ask

Why is Google Captcha not working?

Make sure your browser is fully updated (see minimum browser requirements) Check that JavaScript is enabled in your browser. Try disabling plugins that might conflict with reCAPTCHA.

Why reCAPTCHA is not showing sometimes?

One of the most common reasons why this error occurs is that of an outdated Chrome version. reCAPTCHA will actively look at the browser version before allowing you access. This is applicable to all browser versions, not just Chrome. In this case, the solution is to update Google Chrome to the latest version.

How do I enable Google reCAPTCHA?

Add Google reCAPTCHA to a formClick the pencil icon or Edit on the form or newsletter block. In the Storage tab, click Google reCAPTCHA. Switch the Use Google reCAPTCHA toggle on. Repeat these steps for all form blocks on your site where you want to add a reCAPTCHA.

Can I run reCAPTCHA v2 and v3 on the same page?

Can I run reCAPTCHA v2 and v3 on the same page? To do this, load the v3 site key as documented, and then explicitly render v2 using grecaptcha.render.


1 Answers

The problem was solved when I moved the script tag below the reCaptcha div, instead of placing it inside the head tag like google said. But hey, it finally works.

like image 111
Mister_L Avatar answered Oct 03 '22 08:10

Mister_L