Support » Plugin: Contact Form 7 reCAPTCHA Extension » reCAPTCHA not working after latest update

  • Hello there,

    does anybody know why reCAPTCHA is not showing after the latest update from 4.7.5 to 4.8? Latest WordPress version.
    I have this problem on multiple sites hosted in different conditions and all have the same problem, behave the same.
    reCAPTHCA is not loading, i have reset the keys, no result.

    Any ideeas?

    Later edit: If i backroll to 4.7.5 reCAPTCHA appears and is working.

    • This topic was modified 2 years, 3 months ago by  valeriuc.
Viewing 9 replies - 1 through 9 (of 9 total)
  • got the same problem.

    solution #1 : deregister google-recaptcha and register again
    example: put this code inside your themes function.php

    
    function degl_recaptcha_enqueue_scripts() {
    	if ( ! is_admin() ) {
    		$url = 'https://www.google.com/recaptcha/api.js';
    
    		wp_deregister_script( 'google-recaptcha', $url, array(), '2.0', true );
    		wp_register_script( 'google-recaptcha', $url, array(), '2.1', true );
    		wp_enqueue_script( 'google-recaptcha' );
    	}
    }
    
    add_action( 'wp_enqueue_scripts', 'degl_recaptcha_enqueue_scripts' );
    

    solution #2 comment out some lines in contact-form-7/recaptcha.php

    around line 243 make it look like

    
    function wpcf7_recaptcha_enqueue_scripts() {
    	$url = 'https://www.google.com/recaptcha/api.js';
    //	$url = add_query_arg( array(
    //		'onload' => 'recaptchaCallback',
    //		'render' => 'explicit',
    //	), $url );
    
    	wp_register_script( 'google-recaptcha', $url, array(), '2.0', true );
    }
    

    for some (probably early recaptcha implementation method) the plugin author passes arguments to go along with the recaptcha script. It looks like those methods are not supported anymore, but i didn’t verify this. I am just happy the box is showing up. Seems like an easy fix for the next version. fingers crossed.

    • This reply was modified 2 years, 3 months ago by  bort.
    • This reply was modified 2 years, 3 months ago by  bort.

    I will update and try the steps indicated and report back.
    Thanks for your reply. 🙂

    • This reply was modified 2 years, 3 months ago by  valeriuc.
    positivew

    (@positivew)

    Had a similar problem while developing a new site with a custom theme. My issue of reCAPTCHA not showing up was caused by the fact that I had forgotten to call wp_footer() from my theme before closing the body tag.

    I was fighting this problem this morning – used the [reCAPTCHA] toolbar button to insert the tag and try as I might it just was not showing up ….

    until I enclosed it within a <P> tag
    As soon as I added the <P> tag around it it popped right up …

    <P> Verify you’re human : [recaptcha theme:dark]</p>

    Wow – bizzare, I went back to the same site later on and its broken again. Looks like its time to find another option.

    I had the same problem, only caught it in the past week but I suspect it happened in October 2017 when Dreamhost updated our WordPress site’s underlying php version; or possibly on the next automated update of WordPress after that.

    Bort’s solution #2 works perfectly for me. Thank you, Bort.

    To read some of the other posts about this which appear to have run for months without too many good endings, you might think there was no solution and everyone was facing a choice between keeping reCaptcha and keeping Contact Form 7. But that’s not the case. Contact Form 7 should apply this update as soon as they’re aware of it…

    Bort’s solution #2 has just fixed this problem for my site too now!

    Everything was working then one day there was just a blank space where the reCaptcha should be but // those lines of code seems to have done the job!

    Same here. Thank you Bort! I’m hoping updates will not overwrite this.

    Thank You so much Bort for this solution, I was also facing same problem. Now its working….:)

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘reCAPTCHA not working after latest update’ is closed to new replies.