Title: JS Error &#8211; Recaptcha
Last modified: July 17, 2020

---

# JS Error – Recaptcha

 *  Resolved [viablethought](https://wordpress.org/support/users/viablethought/)
 * (@viablethought)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/js-error-recaptcha/)
 * Hello –
 * This plugin is throwing the following error in console:
 * Uncaught (in promise) Error: reCAPTCHA has already been rendered in this element
 * This is happening on pages where there is a separate contact form with recaptcha
   enabled. We don’t have any recaptcha set for this form so not sure why it is 
   trying to render recaptcha?
 * Using the latest version: 1.8.6

Viewing 8 replies - 1 through 8 (of 8 total)

 *  Plugin Author [Constant Contact](https://wordpress.org/support/users/constantcontact/)
 * (@constantcontact)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/js-error-recaptcha/#post-13137442)
 * Do you have a link to the site in question? It sounds like there’s other reCAPTCHA
   in play somehow, and we’d like to see if we can identify how.
 *  Thread Starter [viablethought](https://wordpress.org/support/users/viablethought/)
 * (@viablethought)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/js-error-recaptcha/#post-13137458)
 * Hello –
 * Yep, here is one of them:
 * [https://www.youngslandscape.com/contact/](https://www.youngslandscape.com/contact/)
 * There is a Caldera Forms contact form on the page that is supposed to have recaptcha
   but since there is a CC Newsletter Sign up form in the right sidebar, this JS
   error is preventing the recaptcha from rendering on the other form. This was 
   working (probably previous to this last update), may have to roll back to 1.8.5
   to see.
 * Thanks
 *  Thread Starter [viablethought](https://wordpress.org/support/users/viablethought/)
 * (@viablethought)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/js-error-recaptcha/#post-13137485)
 * Hello –
 * Nope, does the same thing in 1.8.5 as well. Not sure why it is trying to use 
   recaptcha if it is not enabled for the plugin or why it is trying to force someone
   to use it. This doesn’t seem right at all.
 * At what point was the “Spam Control” introduced into the plugin because if you
   can’t provide a quick fix for this, I may have to roll back to the version before
   it was added.
 * Thanks
 *  Plugin Author [Constant Contact](https://wordpress.org/support/users/constantcontact/)
 * (@constantcontact)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/js-error-recaptcha/#post-13137769)
 * Confirming that I’m seeing this output in the code, which is a little odd because
   last I knew, we intended to only load parts when needed.
 *     ```
       <script type='text/javascript' src='https://www.youngslandscape.com/wp-content/plugins/constant-contact-forms/assets/js/ctct-plugin-recaptcha-v2.min.js'></script>
       ```
   
 * Will get back to you with a bit more shortly.
 *  Thread Starter [viablethought](https://wordpress.org/support/users/viablethought/)
 * (@viablethought)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/js-error-recaptcha/#post-13137774)
 * Hello –
 * Same error is showing on 3 other sites we maintain for clients. Hopefully you
   can fix this soon.
 *  Plugin Author [Constant Contact](https://wordpress.org/support/users/constantcontact/)
 * (@constantcontact)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/js-error-recaptcha/#post-13137818)
 * Can you try dropping this code into one of the sites in question?
 *     ```
       function ctct_support_remove_recaptcha_v2() {
       	$recaptcha_base = new ConstantContact_reCAPTCHA();
       	if ( ! $recaptcha_base::has_recaptcha_keys() ) {
       		wp_dequeue_script('recaptcha-v2');
       		wp_dequeue_script('recaptcha-lib-v2');
       	}
       }
       add_action( 'wp_enqueue_scripts', 'ctct_support_remove_recaptcha_v2' );
       ```
   
 * What the code will do is check if the site has some reCAPTCHA keys set in the
   options, and if NOT, then it’ll remove the 2 javascript files from loading in
   the end. If there are keys, then it will.
 * It’s hard to call it a bug because technically things are running as they should.
   However, I was mistaken in that we were enqueuing only when needed, and I’ll 
   be filing an internal issue to look into changing that.
 *  Thread Starter [viablethought](https://wordpress.org/support/users/viablethought/)
 * (@viablethought)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/js-error-recaptcha/#post-13138164)
 * Hello –
 * That seems to have done the trick. Thanks for the fix.
 *  Plugin Author [Constant Contact](https://wordpress.org/support/users/constantcontact/)
 * (@constantcontact)
 * [5 years, 10 months ago](https://wordpress.org/support/topic/js-error-recaptcha/#post-13145596)
 * Thanks for confirming. Hopefully we’ll have a release out soon that doesn’t require
   this custom code for you.

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘JS Error – Recaptcha’ is closed to new replies.

 * ![](https://ps.w.org/constant-contact-forms/assets/icon-256x256.png?rev=2951825)
 * [Constant Contact Forms](https://wordpress.org/plugins/constant-contact-forms/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/constant-contact-forms/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/constant-contact-forms/)
 * [Active Topics](https://wordpress.org/support/plugin/constant-contact-forms/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/constant-contact-forms/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/constant-contact-forms/reviews/)

## Tags

 * [reCAPTCHA](https://wordpress.org/support/topic-tag/recaptcha/)

 * 8 replies
 * 2 participants
 * Last reply from: [Constant Contact](https://wordpress.org/support/users/constantcontact/)
 * Last activity: [5 years, 10 months ago](https://wordpress.org/support/topic/js-error-recaptcha/#post-13145596)
 * Status: resolved