Problem/Motivation
The same issue as found in this report: https://www.drupal.org/project/captcha/issues/3426421 exists for version 8.x-1.17. When an image captcha is on a webform with a file upload field, this creates the error:
Missing required form ID on route entity.node.canonical
This does not affect the end user's ability to submit the webform and all data is successfully saved. This just generates the above error for every file upload field.
Steps to reproduce
Place an image captcha on the same webform page as a file upload. Upload a file, fill in the captcha and save. The error will appear in the watchdog logs.
Issue fork captcha-3589845
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
avpadernoComment #5
japerryThe cause: a managed_file "Upload" button has #limit_validation_errors.
The MR changes the callback so it only acts when the image was actually built. With no image there is nothing to attach a refresh link to, so it returns quietly. The error is now logged only when an image exists but the form ID is missing. Nothing changes for normal page loads or the real submit.
Also added a new functional test, ImageCaptchaLimitedValidationTest. It submits a limited-validation "Upload" button on an image CAPTCHA form and asserts that nothing is logged.
Comment #7
japerry