Unable to submit webform with reCAPTCHA v3 - AJAX conflict

Created on 9 February 2024, 10 months ago

Updated Summary of Issue

I've determined that this module or a dependent module doesn't work if the webform has its AJAX setting turned on. AJAX is required for validation patterns.

Problem/Motivation

Hello. People are currently unable to submit a form which is using reCAPTCHA v3. In another ticket, I was advised to use both a captcha point and the captcha element in the form, if I'm correct. Otherwise, the reCAPTCHA logo was not being displayed and suggests it wasn't working. I've configured reCAPTCHA v3 with keys that are working, because Google has been tracking forms. I have a screenshot from a person who cannot submit the form - see attached.

The form being reported has the captcha element correctly configured with the reCAPTCHA v3 action. The action has a threshold of 0.5. The form is added to the captcha points.

I just turned off the global "on" state for reCAPTCHA (not v3). I wonder if this was causing issues.

Steps to reproduce

I'm using Drupal 10.2.2. My captcha modules are all up-to-date. I have CAPTCHA enabled, as well as reCAPTCHA and reCAPTCHA v3.

Please advise

πŸ› Bug report
Status

Closed: duplicate

Version

2.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States rraney

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @rraney
  • πŸ‡ΊπŸ‡ΈUnited States rraney

    Here is more information on configurations:

    Default CAPTCHA challenge type is the action I created in the Actions tab.
    Yes, to "Omit challenges in a multi-step/preview workflow once the user successfully responds to a challenge".
    All forms are configured as CAPTCHA points.
    reCAPTCHA has keys and is set to be ON globally (I turned this back on to see if it had anything to do with the reCAPTCHA button not showing)
    reCAPTCHA keys are configured. Local domain name verification is turned off.
    The single reCAPTCHA v3 action is configured with 0.5 threshold and reCAPTCHA fallback.

  • πŸ‡ΊπŸ‡ΈUnited States rraney

    There appears to be only one form with issues but I have not verified all forms. This form itself has multiple pages. I wonder if this somehow messes up the functionality of reCAPTCHA v3.

  • πŸ‡ΊπŸ‡ΈUnited States rraney

    Yesterday, I turned on AJAX for this form. That might be the issue somehow. I turned it on because it's required for the validation we are doing. For now, I've changed the captcha element to be a math question, but please advise if you have any ideas on what's happening.

  • πŸ‡ΊπŸ‡ΈUnited States rraney

    I turned off AJAX and the reCAPTCHA v3 works again. So this becomes a bug report that I've observed with a bit of testing.

    Summary: This module or a dependent module appears to not work with AJAX turned on in the webform.

  • πŸ‡ΊπŸ‡ΈUnited States rraney
  • πŸ‡ΊπŸ‡ΈUnited States rraney
  • πŸ‡ΊπŸ‡¦Ukraine dench0

    This appears to be a duplicate issue.

    https://www.drupal.org/project/recaptcha_v3/issues/3356718#comment-15026680 πŸ› reCAPTCHA v3 not working in form with ajax elements Closed: works as designed

  • Status changed to Closed: duplicate 10 months ago
  • πŸ‡ΊπŸ‡ΈUnited States rraney
Production build 0.71.5 2024