• Resolved OsakaWebbie

    (@osakawebbie)


    After a visitor reported that our contact form was hanging when submitting (spinner next to submit button would spin forever), I discovered that not only was it indeed hanging, but also that the reCAPTCHA v2 checkbox and label are not appearing on the form. This site doesn’t get much real traffic at the moment, so I don’t know how long it has been like that. (Curiously, spam messages are still being recorded in Flamingo – I guess that step happens before the CAPTCHA validation.) Updating WordPress to 6.0.1 solved the hanging issue – CF7 had been auto-updated to a version that required at least WP 5.9, but ours was still on 5.8.something. But the reCAPTCHA still doesn’t display – submitting will cause validation to announce: “Could not verify the reCaptcha response.” The site has three forms (Mailchimp signup in sidebar, Contact Us, and Volunteer) in two languages – all six forms have [recaptcha] (the Mailchimp forms have [recaptcha size:compact align:center]; the others are just the default), and none of them are currently displaying it. Help is appreciated.

    Related plugins and versions:
    Wordpress: 6.0.1
    Contact Form 7: 5.6.1
    ReCaptcha v2 for Contact Form 7: 1.4.3
    Honeypot for Contact Form 7: 2.1.1
    Contact Form 7 Extension For Mailchimp: 0.5.62

    The page I need help with: [log in to see the link]

Viewing 4 replies - 1 through 4 (of 4 total)
  • Plugin Author IQComputing

    (@iqcomputing)

    Hello,

    For some reason or another the plugins JS file is not being enqueued. We expect to see a reference to wpcf7-recaptcha-controls.js in the page source but we’re not seeing it. If this is a custom theme, please ensure that the header called wp_head() and the footer called wp_footer(). If you find that the theme does call these functions properly, we would recommend installing WordPress Health Check & Troubleshooting tool to safely disable plugins and revert to a default theme. If there is a theme or plugin conflict, we can try to work with the authors to fix the issue.

    A running theory is that maybe a secondary plugin is adding in Google ReCaptcha and overriding this plugin’s version, but please let us know what you find. Have a wonderful rest of your week!

    Thread Starter OsakaWebbie

    (@osakawebbie)

    Thanks for the help. The Health Check & Troubleshooting plugin (nice tool!) helped me determine that it was something in my child theme, even though I haven’t touched it in a long time. (The last modification date on functions.php was over two years ago.) But the culprit was indeed a function there – the comment I wrote above it said it was to set the language for reCaptcha in Contact Form 7 – this site is bilingual using Polylang, and apparently the “I’m not a robot” text was not responding to the locale. But when I commented out that function, the checkbox reappeared. And your plugin seems to be changing language just fine without it, so I guess you fixed the localization problem, and that or some other change along the way caused a conflict with this hack. (I don’t remember where I found the hack – I wouldn’t have known enough to write it myself.) In case you’re curious, this was the code:

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

    Thanks again for the quick response and good hints, and of course for developing this useful plugin!

    I want to make changes to the pages but there is no edit button on the page that I want to change, It doesn’t have a checkbox as well beside it. What could be the cause of this?

    • This reply was modified 2 years, 7 months ago by debres1226.
    Thread Starter OsakaWebbie

    (@osakawebbie)

    What view are you looking at? A page as seen by the public, the list of pages in the admin area, or somewhere else? Anyway, your question doesn’t sound related to this thread’s topic or even this section of the forum (which is for questions specific to the “ReCaptcha v2 for Contact Form 7” plugin). Perhaps you should go to https://wordpress.org/support and look at the tutorials, and if you’re still stumped, start a new topic in the general forum: https://wordpress.org/support/forum/how-to-and-troubleshooting

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Checkbox no longer displayed’ is closed to new replies.