Missing required form ID on route entity.node.canonical

Created on 7 March 2024, 8 months ago
Updated 26 August 2024, 3 months ago

Problem/Motivation

Using captcha module 2.0.5 and webform module 6.2.2, when I place an image captcha on a webform with some file upload fields, it creates the following error in the system logs when uploading a file:

Missing required form ID on route entity.node.canonical

All works well in the frontend and the file upload but we have this error in the logs for each file upload in the webform with an image captcha.

Steps to reproduce

Place an image captcha on the first page of a webform with at least one file upload field on the second page of the webform.

You fill the Captcha on the first page and then you upload a file on the second page.

This creates the aforementioned error in the system log on the ajax upload call :

https://mywebsite.com/mywebform?_wrapper_format=drupal_ajax&ajax_form=1&element_parents=elements/etape_2/fieldset_etape_2___constituer_votre_dossier/diplome_6

It does not matter if I add the image captcha directly on the webform or using captcha points, we always have this error in the logs on each file upload. This is why I think this issue comes from the image captcha sub-module and not the webform module. Please, correct me if I'm wrong.

Proposed resolution

Do not check for the form_id in imageCaptchaAfterBuildProcess() during an ajax file upload.

Remaining tasks

Determine how to implement the proposed solution.

User interface changes

None

API changes

None

Data model changes

None

πŸ› Bug report
Status

Needs work

Version

2.0

Component

Image Captcha (image_captcha)

Created by

πŸ‡¨πŸ‡¦Canada leducdubleuet Chicoutimi QC

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

Comments & Activities

Production build 0.71.5 2024