In turnstile 1.1.25, the "Drupal User's Chosen Language" option at /admin/config/people/captcha/turnstile is not applied.

In turnstile_captcha(), the code assigns the resolved language to $langcode, but the widget uses $language for data-language.

So the selected option is not used correctly.

Proposed fix: assign the value to $language instead.

Patch attached.

CommentFileSizeAuthor
#2 3582598-user-preferred-language.patch609 bytesekolmyk

Comments

ekolmyk created an issue. See original summary.

ekolmyk’s picture

StatusFileSize
new609 bytes
ekolmyk’s picture

Assigned: ekolmyk » Unassigned

  • greatmatter committed bcc510f7 on 1.1.x
    Modify the variable that holds the chosen language per issue #3582598 by...
greatmatter’s picture

Assigned: Unassigned » greatmatter
Status: Active » Fixed

Great catch, and thank you for providing the fix. It's been committed, and released to 1.1.26.

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.

greatmatter’s picture

Status: Fixed » Closed (fixed)