Recaptcha Error on multiple MODX3 sites

Hi all,

We are facing a reCAPTCHA problem on multiple websites. These websites are up-to-date (modx 3.0.3) and we use Formit to send forms. However, at random moments, recaptchav2 displays the following error message (client-side):
timeout-or-duplicate hostname-mismatch action-mismatch score-threshold-not-met.

The problem does not occur with every form submission, which makes it even more difficult to trace the problem. However, I have configured the problems to now appear in the error log of modx. This results in the following error message:

ReCaptcha\Response Object
(
[success:ReCaptcha\Response:private] =>
[errorCodes:ReCaptcha\Response:private] => Array
(
[0] => timeout-or-duplicate
[1] => hostname-mismatch
[2] => action-mismatch
[3] => score-threshold-not-met
)

[hostname:ReCaptcha\Response:private] => 
[challengeTs:ReCaptcha\Response:private] => 
[apkPackageName:ReCaptcha\Response:private] => 
[score:ReCaptcha\Response:private] => 
[action:ReCaptcha\Response:private] => 

)

Does anyone else have this problem?

We have tested ourselves and have identified the problem.

The Recaptcha error is showing up when:

  1. In the Safari browser (mobile and desktop), the error message appears if the submit button is clicked twice (with 1 second between the two clicks). So, if the page loads slowly and an impatient person clicks a second time, the error message appears.

  2. The error message appears in all browsers if it takes more than 2 minutes to fill in the form. Especially with longer forms where details need to be filled in, this is a problem.

Does anybody have an idea how to solve this?

What version of Google reCAPTCHA are you using? V2 or V3?

Maybe try changing the version or using a different extra for spam protection. (For example Akismet.)

You can disable the submit button by JavaScript after a submit to solve the submit twice issue.

And you can build a second form that presents and confirms the values of a submitted first form for longer forms, which have this 2 minutes issue.

+1 for Akismet. You do have to pay for it, but you can pick the payment (last time I checked). It’s very easy to install MarkH’s extra and to get it working. In my experience it’s not only better at blocking spam than reCaptcha, it’s much more reliable as well.

I have replaced reCAPTCHA with Akismet and the issues have been resolved! Thank you for your responses.

1 Like

This topic was automatically closed 2 days after discussion ended and a solution was marked. New replies are no longer allowed. You can open a new topic by clicking the link icon below the original post or solution and selecting “+ New Topic”.

Glad you got it sorted. Akismet is great. With it, I found that almost 97% of the registrations at my site were from spambots.

I only wish Mark’s Akismet extra was easier to integrate into other forms (e.g., SPForm).