Missing schema.xml

Created on 11 February 2017, almost 8 years ago
Updated 29 July 2023, over 1 year ago

All config in Drupal 8 should have a matching schema β†’ at config/schema/MODULE.schema.xml.

Although superfish does not have its own top-level config object, it has a block config form. This means that superfish creates config at block.block.* with keys settings.level, settings.depth, settings.menu_type etc.

The module config_inspector β†’ is a useful tool to show the errors. It reveals 48 errors for each superfish block - one per configuration field.

The matching schema should be similar to the blocks defined in Drupal core system.schema.yml. It needs to be something like this:

block.settings.superfish:
  type: block_settings
  label: 'Superfish block'
  mapping:
    menu_type:
      type: string
      label: 'Menu type'
    style:
      type: string
      label: 'Style'
....

The consequences of the missing schema are modest at present as Drupal does not normally rigorously enforce the schema. Some config import/export/analysis/display tools might not work properly. However now that the D8 version of the module is close to stable it would be useful to get the schema in place. The majority of D8 contrib modules I am using have the correct schema.

πŸ“Œ Task
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom adamps

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

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