Loading
Issue #3641565: Stop saving image_captcha.settings during form build
Issue: https://www.drupal.org/project/captcha/issues/3641565
Summary of Changes:
- Removed config writes (
$config->set('image_captcha_fonts_preview_map_cache', ...); $config->save();) duringImageCaptchaSettingsForm::settingsDotSection()form building. - Implemented standard Drupal Cache API caching in
_image_captcha_get_available_fonts_from_directories()with cache IDimage_captcha:available_fonts. - Updated
CaptchaFontPreviewControllerandimage_captcha_font_preview()to read available fonts from_image_captcha_get_available_fonts_from_directories(). - Removed deprecated
image_captcha_fonts_preview_map_cachesequence from config install and schema definitions. - Added post-update hook
image_captcha_post_update_remove_fonts_preview_map_cache()to clean up existing active configuration. - Added functional test assertion verifying
image_captcha.settingsremains untouched after loading the settings form.
AI Disclosure: Code, tests, and MR description were drafted with the assistance of an AI tool (Antigravity/LLM), and manually verified and tested.
Edited by Keerthi Kumar