Problem/Motivation

The ALTCHA challenge is appearing on every page of a multi-page webform even when CAPTCHA settings are set to omit the challenge in multi-page workflows once the user successfully responds to it.

Using the default math CAPTCHA and the image_captcha submodule in the CAPTCHA module with an omit persistence option enabled, after a user completes the challenge on the first page of a multi-page webform, subsequent pages do not present the challenge. This omitting behavior is what is expected to happen with ALTCHA as well.

Steps to reproduce

  1. Install CAPTCHA, ALTCHA, Webform, Webform UI modules.
  2. Set ALTCHA as the default CAPTCHA, enable CAPTCHA on all forms, and set persistence is set to an 'omit' option (e.g., "Omit challenges in a multi-step/preview workflow once the user successfully responds to a challenge.").
  3. Create a webform with multiple pages and fields per page.
  4. Visit the form as an anonymous user to get the ALTCHA challenge. Continue to the next page and see the ALTCHA challenge is displayed again despite persistence setting set to omit.

Comments

j_s created an issue. See original summary.

robindh’s picture

Status: Active » Closed (duplicate)
Related issues: +#3496865: CAPTCHA persistence ignored when 'cacheable' attribute is enabled

Thanks for reporting - I can reproduce this issue. However, the root cause seems to be in the upstream CAPTCHA module as reported here: https://www.drupal.org/project/captcha/issues/3496865.

The ALTCHA implementation does use the cacheable flag on the captcha element as described in that issue.
Did a quick test with the merge request code and it did seem to work as expected for this use case. Needs additional testing though.

Closing this issue as a duplicate

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

j_s’s picture

Thanks!