Google ReCAPTCHA v2 placeholder element must be an element or id

322 Views Asked by At

I've had google recaptcha v2 running from last few months but now suddenly it stopped working on my live site (https://blisspot.com/signup). Its working fine on dev site (https://dev.blisspot.com/signup) though. I'm using git to deploying changes which makes me certain that there is no difference between dev and live site code.

I've already tried different solutions suggested in similar posts but non of them is working. I've also tried different api keys but error remains same. Is it possible that google may have banned my domain? Any suggestions would be much appreciated.

$$('.g-recaptcha').each(function ($el) {
      if ($el.retrieve('recaptcha-loaded', false)) {
        return;
      }
      $el.empty();
      grecaptcha.render($el, {
        sitekey: $el.get('data-sitekey'),
        theme: $el.get('data-theme'),
        type: $el.get('data-type'),
        tabindex: $el.get('data-tabindex'),
        size: $el.get('data-size'),
      });
      $el.store('recaptcha-loaded', true);
    });

Here is stacktrace.

recaptcha__en.js:212 Uncaught Error: reCAPTCHA placeholder element must be an element or id
    at VM214 recaptcha__en.js:212
    at Object.render (mootools-core-1.4.5-…at-nc.js?c=1160:959)
    at core.js?c=1160:961
    at Elements.Elements.forEach (<anonymous>)
    at Function.forEach (mootools-core-1.4.5-…at-nc.js?c=1160:220)
    at Elements.Elements.each (mootools-core-1.4.5-…at-nc.js?c=1160:337)
    at Object.render (core.js?c=1160:952)
    at signup:562
    at condition (mootools-core-1.4.5-…t-nc.js?c=1160:4352)
    at defn (mootools-core-1.4.5-…t-nc.js?c=1160:4366)
(anonymous) @   recaptcha__en.js:212
(anonymous) @   mootools-core-1.4.5-…at-nc.js?c=1160:959
(anonymous) @   core.js?c=1160:961
(anonymous) @   mootools-core-1.4.5-…at-nc.js?c=1160:220
each    @   mootools-core-1.4.5-…at-nc.js?c=1160:337
render  @   core.js?c=1160:952
(anonymous) @   signup:562
condition   @   mootools-core-1.4.5-…t-nc.js?c=1160:4352
defn    @   mootools-core-1.4.5-…t-nc.js?c=1160:4366
load (async)        
addListener @   mootools-core-1.4.5-…t-nc.js?c=1160:3904
addEvent    @   mootools-core-1.4.5-…t-nc.js?c=1160:4369
(anonymous) @   mootools-core-1.4.5-…t-nc.js?c=1160:4620
addEvent    @   mootools-more-1.4.0.…at-nc.js?c=1160:106
(anonymous) @   signup:558
0

There are 0 best solutions below