Back to Community
Troubleshooting Common reCAPTCHA and Cookie Consent Issues with Complianz
Content
Integrating Google reCAPTCHA with cookie consent plugins like Complianz is a common requirement for GDPR/CCPA compliance, but it can often lead to unexpected behavior. Based on community reports, here are the most frequent issues and their potential solutions.
Common Problems and Symptoms
- reCAPTCHA Not Blocking: The reCAPTCHA script loads even before marketing consent is given, violating privacy regulations.
- Invalid Captcha Errors: Users see "invalid captcha" or "grecaptcha is not defined" console errors after accepting cookies.
- Missing Placeholder Button: The prompt to accept cookies for reCAPTCHA disappears, appears transparent, or doesn't show at all.
- Form Styling or Functionality Breaks: Using a consent shortcode wrapper can break a form's checkbox functionality or CSS styling.
- Form Works Without Consent: A form in a site footer or widget might remain active and allow submission before cookies are accepted, leading to data loss.
Why These Issues Happen
These problems typically stem from a few key areas:
- Plugin and Theme Conflicts: The interaction between Complianz, your form plugin (e.g., WPForms, Fluent Forms, Forminator), your theme, and other optimization plugins can cause unexpected behavior.
- Incorrect Configuration: The Complianz settings for blocking reCAPTCHA must be aligned with your form plugin's integration.
- Lack of Native Integration: Complianz has built-in integrations for many popular form plugins. If you are using a less common tool (e.g., Mautic, a custom Brevo form), a native integration may not exist, requiring a manual setup.
- Caching: Aggressive caching mechanisms can serve outdated versions of scripts or interfere with the consent state, causing errors on subsequent page loads or form submissions.
Recommended Troubleshooting Steps
Follow these steps to identify and resolve the problem.
1. Verify Complianz Configuration
First, ensure Complianz is configured correctly for reCAPTCHA.
- Navigate to Complianz -> Integrations -> Services and verify Google reCAPTCHA is enabled.
- Go to the wizard and find the section on third-party services. Ensure Google reCAPTCHA is listed and activated.
- In the wizard, confirm the setting "Do you want to block reCAPTCHA before consent?" is set to "Yes".
- Under Complianz -> Integrations -> Plugins, ensure your specific form plugin (e.g., Gravity Forms, WPForms) is also enabled.
2. Conduct a Conflict Test
Caching and optimization plugins are frequent culprits.
- Disable Caching: Temporarily deactivate any caching, CSS/JS optimization, or CDN plugins. Clear all server and browser caches, then test if the issue persists.
- Check for Version Parameters: If you see a
?ver=parameter in the blocked reCAPTCHA script URL, a optimization plugin is likely adding it. Deactivating these plugins can confirm this. - Theme and Plugin Conflict: Temporarily switch to a default WordPress theme (like Twenty Twenty-Four) and disable all plugins except Complianz and your form builder. If the problem is resolved, reactivate them one-by-one to find the conflict.
3. Check for Native Integration Support
Not all form tools are automatically supported.
- Complianz has direct integrations for plugins like Gravity Forms, WPForms, and Forminator. For others like Fluent Forms (with reCAPTCHA v2) or Mautic, native blocking may not work.
- Solution for Unsupported Forms: For forms without native support, you can often wrap the form HTML in a Complianz consent shortcode or use the Script Center to block the entire form container by its CSS class or ID before consent is given.
4. Address Specific Error Messages
- "grecaptcha is not defined" / "invalid captcha": This usually indicates the reCAPTCHA script is being blocked but not properly re-initialized after consent is given. This is often a conflict with caching. Disabling caching for the page or using the async and defer attributes in the Script Center can help.
- Transparent/Missing Placeholder: This is typically a CSS conflict with your theme. Using your browser's inspector tool to examine the placeholder can help identify the CSS rule that is hiding it.
- Form Breaks in Shortcode Wrapper: Wrapping a complex form in a shortcode can sometimes break its internal JavaScript. For these cases, using the Script Center to block the script directly is often a more reliable method.
Need More Help?
If these steps do not resolve your issue, the wider community can often help. When seeking help, be prepared to share:
- The specific form plugin and version you are using. <liYour theme name.
- Any relevant error messages from the browser's JavaScript console.
- A description of the exact behavior you are seeing.
Related Support Threads Support
-
Lost button ‘Click here to accept reCaptcha cookies …’https://wordpress.org/support/topic/lost-button-click-here-to-accept-recaptcha-cookies/
-
hCaptcha GDPRhttps://wordpress.org/support/topic/hcaptcha-gdpr/
-
isable reCAPTCHA until cookies have been acceptedhttps://wordpress.org/support/topic/isable-recaptcha-until-cookies-have-been-accepted/
-
Add reCaptcha for Data Requests (SPAM)https://wordpress.org/support/topic/add-recaptcha-for-data-requests-spam/
-
Captcha placeholder issuehttps://wordpress.org/support/topic/captcha-placeholder-issue/
-
Hide gogole recaptcha version information from source codehttps://wordpress.org/support/topic/hide-gogole-recaptcha-version-information-from-source-code/
-
RECAPTCHA problemhttps://wordpress.org/support/topic/recaptcha-problem-18/
-
mailchimp_embed_signuphttps://wordpress.org/support/topic/mailchimp_embed_signup/
-
Recaptcha is invalidhttps://wordpress.org/support/topic/recaptcha-is-invalid/
-
Contact form 7 is deprecated?https://wordpress.org/support/topic/contact-form-7-is-deprecated/
-
complianz consent shortcode wrapper messes up Brevo formhttps://wordpress.org/support/topic/complianz-consent-shortcode-wrapper-messes-up-brevo-form/
-
Issue with ReCpatcha placeholder, Forminator and Hestiahttps://wordpress.org/support/topic/issue-with-recpatcha-placeholder-forminator-and-hestia/
-
“do not track me” setting preventing acceptance of cookiehttps://wordpress.org/support/topic/do-not-track-me-setting-preventing-acceptance-of-cookie/
-
Proper configuration of Complianz with recaptcha to avoid malfunction and spamhttps://wordpress.org/support/topic/proper-configuration-of-recaptcha-to-avoid-spam/
-
recaptcha is not detected by complianz using mautichttps://wordpress.org/support/topic/recaptcha-is-not-detected-by-complianz-using-mautic/
-
ReCaptcha v3 within Gravityforms not being blockedhttps://wordpress.org/support/topic/recaptcha-v3-within-gravityforms-not-being-blocked/
-
Issue with Complianz, Fluent Forms and Google reCaptcha v2https://wordpress.org/support/topic/issue-with-complianz-fluent-forms-and-google-recaptcha-v2/
-
recaptcha v3 blocking does not work as expected with Brevo sign up formhttps://wordpress.org/support/topic/recaptcha-v3-blocking-does-not-work-as-expected-with-brevo-sign-up-form/
-
what does non-support of Contact Form 7 mean?https://wordpress.org/support/topic/what-does-non-support-of-contact-form-7-mean/