Module configuration issues

Created on 21 September 2022, about 2 years ago
Updated 5 August 2024, 3 months ago

Problem/Motivation

1. AddressProvider plugin config is unnecessarily being serialized and un-serialized

It is difficult to override config for an AddressProvider plugin when the configuration is serialized.

Instead of:

$config['address_autocomplete.settings']['google_maps']['api_key'] = 'foo';

One must specify a serialized array:

$config['address_autocomplete.settings']['google_maps'] = 'a:2:{s:9:"plugin_id";s:11:"google_maps";s:7:"api_key";s:3:"foo";}';

Additionally, it does not appear that the serialization and un-serialization of the plugin config is actually necessary.

2. Immutable (potentially overridden) config values are displayed in config admin screens for edit

This can lead to confusion and is not standard practice in module config forms.

3. We appear to be lacking a configuration schema file for our module settings

Proposed resolution

- Add a configuration schema file
- Write an update hook to un-serialize and re-save the AddressProvider plugin configuration and remove the serialization and un-serialization steps when saving and loading config.
- Display mutable/editable config values in module configuration forms

Remaining tasks

User interface changes

DX: Easier / standard configuration overrides, easier to read config in config files.
UX: Less confusion in settings forms when configuration overrides are present.

API changes

Data model changes

πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States chrisolof

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024