Problem/Motivation

If you have Altcha installed since <1.2.0, your project didn't get schema updates.
Eg: https://git.drupalcode.org/project/altcha/-/commit/a727dda4356750ba9927a... introduced i18n_method and i18n_library_override config keys but there are not hook_update_N() to set default values.

This leads to active projects having a NULL value for \Drupal::configFactory()->get('altcha.settings')->get('i18n_method');
The way the code is written in \Drupal\altcha\Utility\AltchaI18nUtility::getI18nAttachment() you don't have an error since there are just ifs checking against 2 values.

The resulting behavior is that you have empty strings instead of "just" non translated strings when showing the captcha widget.

Proposed resolution

Add an upgrade path through hook_update_N() functions when delivering new schema updates to ensure that existing sites benefit from new default values.

Remaining tasks

Write the updates for the updated schema entries.

Issue fork altcha-3631744

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

artusamak created an issue. See original summary.

anybody’s picture

Status: Active » Reviewed & tested by the community

Thanks @artusamak - agreed! RTBC!