Support » Plugin: Contact Form 7 » Contact Form 7 with ReCaptcha v3 marks all messages as a spam

  • Resolved kvvz

    (@kvvz)


    Plugin Contact Form 7 not working properly. After integration with ReCaptcha v3 all messages are marked as spam or printing error of the form.

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

Viewing 15 replies - 1 through 15 (of 19 total)
  • cinderalla

    (@cinderalla)

    The same issue is happening for me. The form cannot be submitted by anyone. This is the error coming from Contact Form 7:

    THERE WAS AN ERROR TRYING TO SEND YOUR MESSAGE. PLEASE TRY AGAIN LATER.

    There is also a JavaScript error when the page with the form is loaded:

    Uncaught ReferenceError: grecaptcha is not defined at (index):154

    Any insight as to why this would happen and/or how to fix it?

    cinderalla

    (@cinderalla)

    Not sure if this could help explain, but when a user is logged into WordPress the contact form works as expected. ReCaptcha seems to only block the submission with the user is not authenticated.

    Appreciate any insight on how to fix this.

    richardlawbag

    (@richardlawbag)

    My forms were all working until last week (31 November 2019) but now they all return an error on form submission. None of the forms were changed. If I remove reCAPTCHA the forms work.

    jasonlazarus

    (@jasonlazarus)

    Same thing happens to all my sites too – the front end user gets an error, and all submissions go to flamingo spam folder.

    Unsure if emails actually get sent or not.

    jasonlazarus

    (@jasonlazarus)

    I believe I found the issue. It had to do with my cache plugin. We use SG Optimizer – I excluded some of the Defer Render-blocking JS settings – There are 2

    1. /plugins/contact-form-7/includes/js/scripts.js
    2. https://www.google.com/recaptcha/api.js?render= WITH A BUNCH OF CHARACTERS HERE

    WHen I added these to FRONTEND> Defer Render-blocking JS it worked just fine

    itsmir

    (@itsmir)

    Also experiencing this issue – I have temporarily solved by rolling recaptcha back to v2 by using the https://wordpress.org/plugins/wpcf7-recaptcha/ plugin. Not great – but at least the form now works.

    I’m interested in the author’s opinion. What your position @takayukister

    Thank you @jasonlazarus ! That solved it for us as well.

    Agree with @kvvz – Wondering what @takayukister position is…

    I had this problem too, didn’t realise it was caused by caching, I use WP Fastest Cache. I switched to a v2 plugin but got a spam today so I’m not sure it’s working. I might switch back to v3 if I can work out how to whitelist the captcha script.

    Same for me and the suggestions above resolved – though not as neat as v3, v2 works!
    I tried cache but no change?

    @takayukister and anyone else with the same issue:
    Here are the steps that seemed to break it and fix it for me:

    To break:
    – This only started after upgrading CF7 to Version 5.1.6.
    – Then Every submission was treated as spam! regardless of logged in or logged out.
    ____________
    statusSpam
    Submitted on: 2020 Feb Sat @ 9:20
    Spam log: reCAPTCHA score (0.00) is lower than the threshold (0.50).

    So message selected as spam, even though the threshold is zero! WTF!
    ____________

    – I only have 2 plugins: CF7 & Flamingo (both latest versions)
    – Deactivating Flamingo made no difference.
    – I also played with the recaptcha.php file – discussed here: https://wordpress.org/support/topic/spam-issue-for-recaptcha-v3-for-contact-form-7-5-1-1/
    It is an older post and the line 112 was different – I changed all 3 lines found in mine
    from: return $spam;
    to: return true;
    ..Which did fix the issue but resulted in SPAM! Who’d have thought 😉

    To get my forms working:
    – Removing Recaptcha v3 keys resolved
    – BUT I then got loads of spam! So while it worked it was not ideal.

    To get my forms working acceptably:
    – Reverting back to Recaptcha v2 (‘iam not a robot’ tickbox) seems to have worked.
    –NOTE, I tried the ‘invisible’ option in google RCv2 but it behaving weird – greying out my hole page and putting the image selector (like choose all traffic lights) at the bottom of the page? So I removed that and did it again with the aim not a robot option.
    – I also added a ‘Quiz’ in my CF7 forms (a ‘what is bigger’ question) as an extra layer.
    – In your google recaptcha you prob need to delete your existing site keys – I could not see this (wood for the trees) but the trash icon is simply at the top right, haha. Grr!
    – In WP remove the keys from CF7 Integration.
    – Install plugin “ReCaptcha v2 for Contact Form 7”
    (thank you author: IQComputing! https://wordpress.org/plugins/wpcf7-recaptcha/#installation)
    – Then back in Google create a new site/keys.
    – In new plugin “ReCaptcha v2 for Contact Form 7” Select ReCaptcha version 2.
    – Add your new keys into CF7 > Integration. It still looks like v3, but just add them there anyway.
    – You also need to add the shortcode back into on your forms: [recaptcha] (as per v2)

    I think that covers it – hoping it helps someone else with the same issue.
    Also hoping CF7 will soon work in harmony with RCv3, as i don’t like 2 either.

    Regards,
    Luke.

    • This reply was modified 3 months, 3 weeks ago by 1ukeridgway.
    • This reply was modified 3 months, 3 weeks ago by Steve Stern.
    don123

    (@don123)

    I have a similar issue! Needing to amend the receiving email address for a form, I tried to send a test form from my PC but got the Orange Box to say rejected try again, I did but no success. After various unsuccessful attempts at resolving myself I therefore assumed an issue with either my host or IP therefore I raised a support ticket with them. For the past several days they and I have been checking and trying various solutions. We have come to the conclusion that reCaptcha v3 is correctly configured with the correct keys, that the latest versions of CF7 and Flamingo are installed and correctly configured. I am using Easy WP SMTP on one site which is correctly set up and tests OK but I am still getting rejections with and without SMTP. Flamingo returns a score of either 0.10 or 0.30. By my by host login in as me on a remote PC they are able to pass the test. I have checked my IP on spam checkers and there are no issues! Has anyone any suggestions where I can go from here apart from ditching CF7?

    technicalx

    (@technicalx)

    switch to Contact Form 7 Captcha was all I could do, it has the “i’m not a robot” button which is more reliable.

    Thanks @1ukeridgway
    Going back to recaptcha v2 (ReCaptcha v2 for Contact Form 7 plugin) was my temp solution.
    Waiting for authors

    Since release of version 5.1.7 3 days ago the problem for me has gone away!

    @don123 How is it possible? I have CF7 5.1.7 and every message in the contact form get the orange frame alert. Did you copy/paste some script or code before the <head> tag?

Viewing 15 replies - 1 through 15 (of 19 total)
  • You must be logged in to reply to this topic.