Misuse of config_object schema type for plugin schema definitions

Created on 6 June 2025, about 2 months ago

I'm in the process of upgrading a project of mine (using roughly 20 external entity types) to Drupal 11.

When on Drupal 11, and using the config inspector module, I'm getting these kind of errors for my external entity type configs:

The LangcodeRequiredIfTranslatableValues constraint is applied to 'external_entities.external_entity_type.my_external_entity_type::config'. This constraint can only operate on the root object being validated.

Apparently this originates from https://www.drupal.org/node/3459863 .

We are misusing the config_object schema type for most (if not all) of our plugin schema definitions. For example:

plugin.plugin_configuration.external_entities_storage_client.rest:
  type: config_object
  label: 'External entities REST storage client settings'

As explained @ https://www.drupal.org/docs/drupal-apis/configuration-api/configuration-... , the config_object type is supposed to be used for global configuration files. Not for our plugin schema definitions, which don't have individual configuration files (they become part of external_entities.external_entity_type.* configuration files).

AFAICT the solution is rather simple, switch to the mapping schema type instead.

🐛 Bug report
Status

Active

Version

3.0

Component

Code

Created by

🇧🇪Belgium rp7

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