I am facing this issue post upgrading my Drupal site to Drupal 10, the link below captcha box "Reload Captcha" not visible which was visible and working in Drupal 9..I have used 2.0.5 Drupal 10 compatible version, not able to see this link.. Please check attached image for the same..
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | Reload_captcha_link_not_visibile_in_D10-3421591-4.patch | 1.17 KB | jordik |
| Drupa10_upgrade_issue.png | 73.96 KB | tushar1 |
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