• Resolved rapadura

    (@rapadura)


    I selected to enable reCaptcha but is not showing up. I have disabled Ajax. What else do I need to do?

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

Viewing 9 replies - 1 through 9 (of 9 total)
  • Plugin Contributor yikesitskevin

    (@yikesitskevin)

    Hi @rapadura,

    I am not sure what’s going on – I can see the reCaptcha <div> being made and the reCaptcha script being loaded but their not linking together.

    There are actually two different reCaptcha scripts being loaded in and only one is coming from our plugin. I am wondering if maybe these two scripts are conflicting. Do you know if anything else on your website is using reCaptcha?

    Let me know.

    Cheers,
    Kevin.

    Thread Starter rapadura

    (@rapadura)

    yes, that reCaptcha is used in the contact page:

    https://www.artsdistrictla.org/contact/

    Plugin Contributor yikesitskevin

    (@yikesitskevin)

    Hi @rapadura,

    I see that the Clean Talk Spam Protect plugin is active on your site. I am wondering if perhaps this plugin is blocking our API call to Google to create the reCAPTCHA. Can you check the plugin’s dashboard and see if any calls are being blocked?

    Thanks,
    Kevin.

    Thread Starter rapadura

    (@rapadura)

    Nothing that i can see

    Plugin Contributor yikesitskevin

    (@yikesitskevin)

    Okay let me down the Custom Contact Forms plugin (this one, righT? https://www.ads-software.com/plugins/custom-contact-forms/) and see if there’s a plugin conflict.

    Thread Starter rapadura

    (@rapadura)

    yes, that is correct

    Plugin Contributor yikesitskevin

    (@yikesitskevin)

    Hey @rapadura,

    I’ve confirmed it’s a plugin conflict. As soon as I activate Custom Contact Forms, our plugin’s ReCaptcha stops working. I haven’t been able to identify the source of this conflict yet though.

    Plugin Contributor yikesitskevin

    (@yikesitskevin)

    Hi @rapadura,

    Long story short, Custom Contact Forms is wiping our ReCaptcha. This snippet will fix it:

    // Fix a plugin conflict w/ Custom Contact Form plugin that is breaking our ReCAPTCHA.
    add_filter( 'yikes-mailchimp-after-form', 'yikes_mailchimp_fix_recaptcha_conflict', 10, 2 );
    
    function yikes_mailchimp_fix_recaptcha_conflict( $form_id, $form_data ) {
    
    	include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
    
    	// Check if reCaptcha is active and the Custom Contact Form plugin is active
    	if ( is_plugin_active( 'custom-contact-forms/custom-contact-forms.php' ) && get_option( 'yikes-mc-recaptcha-status' , '' ) == '1' ) {
    		?>
    			<script type="text/javascript">
    				if ( typeof jQuery === 'function' ) {
    					jQuery( document ).ready( function() { 
    						if ( typeof renderReCaptchaCallback === 'function' ) {
    							var x = 0;
    							var interval = setInterval( function() {
    								
    								if ( jQuery( '.g-recaptcha' ).length > 0 ) {
    									renderReCaptchaCallback();
    									clearInterval( interval );
    								}
    
    								// Sanity check
    								x++;
    								if ( x > 100 ) {
    									clearInterval( interval );
    								}
    
    							}, 1000 );
    						}
    					});
    				}
    			</script>
    		<?php
    	}
    }

    Are you familiar with adding custom filter functions? These should be added to your child theme’s functions.php, your theme’s functions.php, or added via a plugin like My Custom Functions (https://www.ads-software.com/plugins/my-custom-functions/). Be careful when editing your theme’s files as a mistake can break your website.

    Cheers,
    Kevin.

    Thread Starter rapadura

    (@rapadura)

    Perfect, that was the issue. I got it to work now. Thank you

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘reCaptcha not showing up’ is closed to new replies.