Problem/Motivation

Stemming from https://www.drupal.org/project/captcha/issues/3377498, recaptcha_v3_post_captcha_element_process() no longer unsets the CAPTCHA description correctly, causing it to show when using recaptcha_v3.

Steps to reproduce

* Enable recaptcha_v3
* Observe CAPTCHA description and title is shown

Proposed resolution

* Use a hook_preprocess_captcha to unset the title and description

Command icon 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

Alexj12 created an issue. See original summary.

alexj12’s picture

This is a relatively quick fix. In my case I haven't had an issue with hook precedence but it _could_ be an issue.

alexj12’s picture

Status: Active » Needs review
dench0’s picture

Status: Needs review » Needs work

@Alexj12
I can't reproduce it. And now the description is hidden by overwriting the template file:
https://git.drupalcode.org/project/recaptcha_v3/-/blob/2.0.x/templates/c...
https://git.drupalcode.org/project/captcha/-/blob/2.x/templates/captcha....

You need to investigate the issue on your side, but it looks like the module works as it should.

alexj12’s picture

Status: Needs work » Needs review

Hi @dench0,

This is on 8.x-1.8, with any version of CAPTCHA from 8.x-1.11 (inclusive).

I don't believe the 2.0.x branch is affected, but we can't use an alpha version of a module.

Thanks

dench0’s picture

Status: Needs review » Needs work

I apologize, I wasn't too attentive and thought the problem was occurring on recaptcha v3 2.x.
Then for the BC we need to leave the old code as well or increase the captcha module version in the composer.json.

dench0’s picture

Status: Needs work » Needs review

  • dench0 committed a5e3b41d on 8.x-1.x authored by Alexj12
    Issue #3381492 by Alexj12, dench0: Since CAPTCHA 8.x-1.11 / 2.x update...
dench0’s picture

Status: Needs review » Fixed
alexj12’s picture

Thanks for this @dench0, super quick!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.