Extension

Archived
Forum
(read-only)

reCAPTCHA v2

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

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

     

Console error “Uncaught Error: ReCAPTCHA placeholder element must be empty”

Bug Report

MarkS
MarkS

I have just installed this on EE 2.11.3. Using Freeform Pro v4.2.4

Uncaught Error: ReCAPTCHA placeholder element must be empty
  at Object.to [as render] (recaptcha__en_gb.js:300)
  at reCAPTCHAv2 (eval at <anonymous> (jquery-1.8.0.min.js:1), <anonymous>:2:13)
  at Ve (recaptcha__en_gb.js:57)
  at recaptcha__en_gb.js:304
  at recaptcha__en_gb.js:391

My form code goes like this:

{exp:freeform:form
     form_name
="contact-form"
     
required="name|email|how_hear|question"
     
return="contact/thank-you"
     
inline_errors="yes"
  


.// other Form fields //.

  
{if freeform:captcha}{freeform:captcha}{/if}
   
  
<p><input type="submit" id="submit" name="submit" value="Submit" /></p>
  
{/exp:freeform:form} 

The recaptcha does appear to be working though.

Denik
# 1
Developer
Denik

Hello,
I think this is a error as the one described here: https://devot-ee.com/add-ons/support/recaptcha-v2/viewthread/16190#53079

Please check your JavaScript code for conflicts with reCaptcha scripts.

MarkS
# 2
MarkS

I dont have duplicate google captcha api code loaded…

Example form here: https://goo.gl/ZGyITZ

Denik
# 3
Developer
Denik

Hello,
I think the error is caused by a conflict with the plugin MMENU, which changes the DOM-object which entails for a double analysis of the contents of the script (including reCaptcha).

Please try to comment out next line in your source code:
http://prntscr.com/eekddz