Config schema is incorrect

Created on 18 March 2024, over 1 year ago

Problem/Motivation

When importing a form_mode_control config change I get the following error:

The configuration property _core.default_config_hash doesn't exist.

Our config doesn't have _core.default_config_hash yet and core is trying to set it automatically. The problem is that in Drupal\Core\Config\Schema\ArrayElement::get(), line 64, there's a check to make sure default_config_hash is an instance of TypedConfigInterface. With this module's config present it's not, it's an instance of \Drupal\Core\TypedData\Plugin\DataType\StringData. This happens because config/schema/form_mode_control.settings.yml is telling Drupal that form_mode_control.settings is an sequence of only strings, but since Drupal adds a few default properties we can't make this assumption.

Proposed resolution

Nest the permissions under a parent key, e.g. permissions.

Remaining tasks

Update the schema, any places using the settings config and any existing config data to match the new structure.

πŸ› Bug report
Status

Active

Version

2.0

Component

Miscellaneous

Created by

πŸ‡§πŸ‡ͺBelgium dieterholvoet Brussels

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024