- 🇪🇨Ecuador jwilson3
I was able to achieve what I needed with a small snippet of code, but it is definitely a bit hacky:
// In settings.php $settings['locale_custom_strings_en'][''] = [ // Ensure settings that are intentionally left empty are not rendered. 'Setting not found' => '', ];
If this were to go in, I would want a bit more context in the alter hook, to be honest:
- to customize the empty token string value on a per-setting basis, ie, pass an argument to the alter hook with the site setting entity machine name.
- to customize the empty token string value on a field type and/or field name, and or site setting group basis, so that a fallback value could be specified appropriately in different cases; i.e. pass an argument to the alter hook with the token name being substituted.
- to customize the empty token string value using the default value specified in the field definition; ie pass an argument to the alter hook with the field definition. (I guess technically this could be loaded based by exploding the token name and loading the field name, so not required but definitely nice to have).
-
scott_euser →
committed a7cc7340 on 8.x-1.x authored by
pavlosdan →
Issue #3150067 by pavlosdan: "Setting not found" not always desired
-
scott_euser →
committed a7cc7340 on 8.x-1.x authored by
pavlosdan →
- Status changed to Fixed
over 1 year ago 4:09pm 15 September 2023 Automatically closed - issue fixed for 2 weeks with no activity.