Closed (outdated)
Project:
CAPTCHA
Version:
2.0.5
Component:
Image Captcha (image_captcha)
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
15 Feb 2024 at 11:59 UTC
Updated:
28 Nov 2024 at 23:34 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
gorkde commentedSame for me on Drupal 9.45 no refresh button
Comment #3
jordik commentedHaving the same issue. The Reload button gets loaded in the config form under example, but is missing on any other form - the image_captcha_refresh.js is not loaded.
Comment #4
jordik commentedAfter some investigation I found the source of error (at least in my case).
When setting up Captcha to appear on a form in Captcha points, the challenge type was set to "Default".
Although the default type was set to "Image" in the global Captcha settings, this was never checked.
Since the function imageCaptchaAfterBuildProcess explicitly checks for "image_captcha/Image" by getting "default" it skips the rendering of the Reload button.
A quick and dirty solution can be to set the challenge type to "Image" manually for every form/captcha point.
A more elegant and robust way is in the patch attached - enabling the check of the global default.
Comment #6
jordik commentedThe test did not fail because of the patch - it is apparently a test problem.
Patches #3403329: Post Drupal 10 Image captcha issue and #3407854: Switch over to GitLab CI fail after being green with the same error.
Comment #7
jordik commentedSeems to be fixed in captcha 2.0.7. Will need the patch from #3489166: Image captcha reload produces a JSON error as the new version produces a JSON error. With the patch the issue is fixed. Closing this one.
Comment #8
jordik commented