Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #1411073

    Hi,
    We’re facing an issue with the contact form and Google reCaptcha in the newest enfold. We can send the contact form at Enfold 5.5, but at 5.6.2 the following error appears:
    Invalid reCAPTCHA form submitted.
    The form could not be submitted. Please refresh the page and try again.
    Regards
    Bernd

    #1411125

    Hey Bernd,
    Are you using Captcha v2 and PHP v8.2?
    Another user shared a solution but I was unable to reproduce the error on my server, perhaps you are experiencing the same error?
    Give this a try.

    Best regards,
    Mike

    #1411280

    Hi Mike
    We’re using Captcha v3 (with v2 failback) and PHP v8.1.2.
    The suggested solution from the other user doesn’t work :-(
    Regards
    Bernd

    #1411304

    Hi,
    Ok, can you create a smaller form to test with on your site such as name, email, & message. I think my answers in your form are causing an error because I don’t know valid answers in your language, this would also ensure that required fields are not the issue. Captcha v3 doesn’t show a Captcha question so the failing of it is based on other things like location.
    When I test on my site I can’t reproduce this error.

    Best regards,
    Mike

    #1411364

    Hi Mike

    It looks like a combination error of WP-Rocket and Enfold. On another site with WP-Rocket and the older Enfold 5.3, the contact form worked fine (with reCaptcha v3). As soon as I updated Enfold to 5.6.2, the contact form no longer works there either…

    I made a small contact form with only three required fields for testing: Name, surname and email. Link in private content.

    An exception for Google reCaptcha in WP-Rocket’s deferred javascript execution is active. Additionally I deactivated the caching of the test page. With this exception the error “Invalid reCAPTCHA form submitted. The form could not be submitted. Please refresh the page and try again.” won’t appear, the form closes after sending, but without a success-message.

    The form works on Microsoft Edge! But not under Chrome, Safari and Firefox.

    Regards,
    Bernd

    • This reply was modified 1 year, 3 months ago by Bernd.
    #1411371

    Hi,
    It sounds like you have found that WP-Rocket’s deferred javascript is the issue, and when not in use the Captcha v3 works correctly.
    It’s probably messing with whatever remote js that Captcha v3 is tring to load, since we don’t know what these files are try to not use the deferred javascript option.

    Best regards,
    Mike

    #1411393

    Hi Mike

    I don’t think so. Because with the older Enfold 5.3 and WP-Rocket it works without any problems. And with the exception for Google reCaptcha in WP-Rocket’s deferred javascript execution the recaptcha works fine. But the form will not be submitted.

    So there must be something new in the contact form since Enfold 5.3.

    I tried it without any captcha and also then it won’t send the form :-(

    Regards,
    Bernd

    • This reply was modified 1 year, 3 months ago by Bernd.
    #1411412

    Hi,
    So your form won’t send with no captcha enabled but it will send if WP-Rocket’s deferred javascript is disabled?
    I recall another thread that pointed to WP-Rocket’s exception list not working properly, try disabling WP-Rocket and check the js files loaded in the browser console on your test page with the contact form, then enable WP-Rocket and enable the deferred javascript option and add all of those javascript files to the exception list, and then check your contact form with no captcha enabled, it should work correctly. If it doesn’t then the exception list isn’t, if it does then you can compare the files in the list to what you had in the list before hand.

    Best regards,
    Mike

    #1412342

    Hi Mike,

    Sorry for my late reply. It’s a strange problem, because the deactivation of WP-Rocket’s deferred JS doesn’t helped always..

    Unfortunately, we haven’t been able to solve the problem yet and our customer doesn’t want higher support costs. In this case we switch to the Contact Form 7 plugin. You can close this topic.

    Regards,
    Bernd

Viewing 9 posts - 1 through 9 (of 9 total)
  • The topic ‘Invalid reCAPTCHA form submitted’ is closed to new replies.