Missing fallback plugin configuration schemas

Created on 11 December 2015, almost 10 years ago
Updated 6 July 2025, 2 months ago

Problem/Motivation

Drupal core provides schemas for the configuration of several plugins and plugin types, but fails to provide fallbacks for some of them. This means that if the schema naming format is action.configuration.*, for instance, no schema with that exact name exists to fall back to when a replacement value for that wildcard does not exist.

Proposed resolution

Add fallback schemas of type ignore. This does not change any behavior, but allows other code to safely use such schema naming formats without having to worry about whether or not a schema exists for the wildcard replacement values the code uses at that particular time. The necessary schemas are:

  • action.configuration.*
  • display_variant.plugin.*
  • condition.plugin.*
  • ckeditor.plugin.*
  • search.plugin.*
  • tour.tip.*
  • views.display.

We MUST NOT provide an actual schema, not even that of the plugin type's base class, because extending base classes is not required and we cannot assume anything about individual plugins' internal configuration.

Remaining tasks

None.

User interface changes

None.

API changes

None.

Data model changes

None.

πŸ› Bug report
Status

Needs work

Version

11.0 πŸ”₯

Component

configuration system

Created by

πŸ‡¬πŸ‡§United Kingdom xano Southampton

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

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.

  • First commit to issue fork.
  • Merge request !12634Converted the patch in #2 and added tests β†’ (Open) created by dcam
  • Pipeline finished with Failed
    2 months ago
    Total: 715s
    #540032
  • Pipeline finished with Failed
    2 months ago
    Total: 554s
    #545691
  • Pipeline finished with Success
    2 months ago
    Total: 540s
    #545695
  • Pipeline finished with Failed
    2 months ago
    Total: 690s
    #545704
  • πŸ‡ΊπŸ‡ΈUnited States dcam

    I converted the patch in #2 to an MR and added the schema verification tests. Some of the original changes are irrelevant now because this issue is so old. But the CKEditor plugin schema is of particular note. I noticed there's no fallback for ckeditor5.plugin.*, but when I attempted to add one other tests started failing with the following message:

    Failed asserting that exception of type "TypeError" matches expected exception "Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException". Message was: "Cannot assign Drupal\Core\Config\Schema\Ignore to property Drupal\ckeditor5\Plugin\CKEditor5PluginDefinition::$schema of type Drupal\Core\TypedData\TraversableTypedDataInterface"

    So there's an check for a specific data type here. I'm not sure if this invalidates the need for a fallback schema or not. I ended up removing that change from the MR.

    Also, I don't know if there are other new plugin types in Core that need this treatment. If anyone knows of some, then let me know.

  • Pipeline finished with Failed
    1 day ago
    Total: 685s
    #600656
  • Pipeline finished with Success
    1 day ago
    Total: 655s
    #600665
Production build 0.71.5 2024