The response parameter is missing.

Created on 19 January 2024, 5 months ago
Updated 23 January 2024, 5 months ago

Problem/Motivation

When I submit a webform I get the Antibot verification failed error message. In the Recent log messages there is an error: Google reCAPTCHA v3 validation failed: The response parameter is missing.

Steps to reproduce

Drupal 10.2.2, PHP 8.1.27, MariaDB 10.6.16, theme: Classic Pro from drupalthemes.io This theme uses the Paragraphs module (v8.x-1.17) to insert a webform to a page. One of my webform id is: webform_submission_contact_style_2_paragraph_217_add_form and it is among the registered Captcha points with recapctha_v3/contact action. The recapctha Badge is on the site, but I can not submit the form: I get the mentioned error message and log entry.

Proposed resolution

The problem can be the special way the theme handles the form (paragraph builder), but I do not have the neccessary skills to resolve this problem.

πŸ› Bug report
Status

Closed: works as designed

Version

2.0

Component

Code

Created by

πŸ‡­πŸ‡ΊHungary bolemanyi.attila

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

Comments & Activities

  • Issue created by @bolemanyi.attila
  • πŸ‡ΊπŸ‡¦Ukraine dench0

    Check your form markup to see if you have an element like on the screenshot.

  • πŸ‡­πŸ‡ΊHungary bolemanyi.attila

    #2
    Unfortunately, this part is totally missing :-(
    You can see here: https://comega7.hu/hu/kapcsolat

  • πŸ‡ΊπŸ‡¦Ukraine dench0

    as I see it's a webform.
    Did you add captcha element to the webform and choose the configured reCAPTCHA v3 action?

  • πŸ‡­πŸ‡ΊHungary bolemanyi.attila

    Okay, the Captcha element was missing, I added it, but as I see, there is no changes :-(

  • πŸ‡ΊπŸ‡¦Ukraine dench0

    1. did you try to clear the cache?
    2. Please show your captcha webform element configuration.
    3. Are you using the custom template for this form?

  • πŸ‡­πŸ‡ΊHungary bolemanyi.attila

    1. Yes, I did.
    2. Attached
    3. As I see, the theme use custom twig template. Should I add captcha element there?

    I think this is the custom twig file's (webform--contact_style_2.html.twig) content:

    {{ element.elements.name }}
    {{ element.elements.email }}
    {{ element.elements.message }}
    {{ element.elements.actions }}
    {{ element.form_token }}
    {{ element.form_build_id }}
    {{ element.form_id }}
  • πŸ‡­πŸ‡ΊHungary bolemanyi.attila

    Now the code is:

    <form {{ attributes }}>
            {{ element.elements.name }}
        {{ element.elements.email }}
        {{ element.elements.message }}
            {{ element.elements.actions }}
            {{ element.elements.captcha }}
            <div>
            {{ element.form_token }}
            {{ element.form_build_id }}
            {{ element.form_id }}
        </div>
    </form>

    It seems that is is working now. Thank you very much!!!

  • Status changed to Closed: works as designed 5 months ago
  • πŸ‡ΊπŸ‡¦Ukraine dench0
Production build 0.69.0 2024