• Resolved aardi

    (@aardi)


    Hey!
    I’m using Contact Form 7 v5.4 and the newest version of your plugin on my site. I’m loading the CF7-Form through a shortcode in my footer. For some reason the ReCaptcha V2 works, but I get an Error in the console:

    Uncaught (in promise) Error: Invalid site key or not loaded in api.js: <API KEY>
        at Array.<anonymous> (recaptcha__en.js:174)
        at recaptcha__en.js:336
        at Object.wpcf7_recaptcha.execute (script.js:5)
        at wpcf7_recaptcha.execute_on_homepage (script.js:21)

    Obviously it’s not good to leave the site key to be accessed via console, do you perhaps know what causes the error?

    I’ve followed the installation guide twice and checked that everything is setup correctly (as evident by the working ReCaptcha), just can’t figure out why it shows the error.

    Thanks in advance,
    Dimi

Viewing 1 replies (of 1 total)
  • Plugin Author IQComputing

    (@iqcomputing)

    Hello,

    Luckily, that API key in your Javascript console is your Public Key. It’s going to be accessible in the source code of your website anyway. The only danger is if it’s also printing out the Secret Key too. Let’s run down a couple of things:

    1) Are you running the latest version of Contact Form 7 and this plugin (ReCaptcha v2 for Contact Form 7)?

    2) Have you cleared your browser’s cache? If you have any caching plugins installed, such as Autoptimize or WP Rock please clear those caches.

    3) If you have a caching plugin such as Autoptimize or WP Rocket could you add the following script to their exclusion list to not get concatenation.

    Settings > Autoptimize > Exclude scripts from Autoptimize:

    wpcf7-recaptcha/assets/js/wpcf7-recaptcha-controls.js

    If you’ve tried the above and are still running into issues and are ok with publicly sharing your website link, please reply to this thread with a link to your website. You may also try to install the WordPress Health Check & Troubleshooting plugin to narrow down the root cause of your issue. It could be a plugin or theme conflict, and the above plugin will help safely disable plugins until you find the offender. Please review their documentation for more information.

    Hopefully, the above info helps you narrow down and solve your issue. If not, please reply to this thread with more information. Have a wonderful weekend!

Viewing 1 replies (of 1 total)
  • The topic ‘Console Error – Invalid Site Key’ is closed to new replies.