Reviewed & tested by the community
Project:
CAPTCHA
Version:
2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
1 Jan 2025 at 18:03 UTC
Updated:
3 Aug 2026 at 19:47 UTC
Jump to comment: Most recent
CAPTCHA persistence settings are ignored when using certain CAPTCHA types, such as reCAPTCHA or Turnstile. As a result, the CAPTCHA is always displayed on forms, regardless of the configured persistence options.
This issue occurs because when the cacheable attribute is set in hook_captcha_captcha, the CAPTCHA module does not update the CAPTCHA status to 'resolved' after a successful completion. As a result, persistence fails, as it primarily depends on the status being correctly updated.
/admin/config/people/captcha, select the option "Omit challenges on all forms once the user successfully responds to any challenge on the site."Fix how captcha status is handled when cacheable attribute is set.
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 #4
anybody@murat_kekic thank you! Could we maybe have a test that fails before these fixes and is green when fixed? That would ensure it's working as expected. Maybe as separate branch?
Comment #7
murat_kekic commentedI ran test with drupal.org. Only the expected tests are failing: https://git.drupalcode.org/project/captcha/-/merge_requests/117
Comment #8
anybodyReally nice @murat_kekic thank you!
Happy to merge this, once the comments are resolved and community RTBC'd it! :)
Comment #9
murat_kekic commentedReady for review
Comment #10
j_s commentedDoes this need a re-roll for changes?
Comment #12
j_s commentedTested and confirmed this MR currently fixes the issue in my testing. Thanks!