Missing schema on nested config

Created on 23 September 2025, 29 days ago

I am going to use images from my PHPStorm because it is a bit too complex to explain with just code samples.

I believe issues https://www.drupal.org/project/config_inspector/issues/3444813 🐛 Incorrect "missing schema" error for widget settings, if widget has the same id as formatter / field type Active , https://www.drupal.org/project/config_inspector/issues/3151056 , https://www.drupal.org/project/drupal/issues/2976616 🐛 Aggregated entity fields cause SchemaIncompleteException Needs review have the same underlying issue but it is only a blind guess.

So we are using the page_manager module to generate some pages. We are further using custom_markup_block to provide content for the page variants.

The custom_markup_block provides the following schema

block.settings.custom_markup:
  type: block_settings
  label: 'Custom markup block'
  mapping:
    markup:
      type: field.value.text
      label: 'Block content'

Creating a page with a page variant that uses this block, creates a yaml that contains the following:

.
.
variant_settings:
  id: block_display
  label: null
  weight: 0
  uuid: 0a890079-6caa-419c-947e-76d26bec5cc4
  blocks:
    6883fa33-5823-47c7-805f-03b235b98733:
      id: custom_markup
      label: 'Solution Terms of Agreement'
      label_display: '0'
      provider: custom_markup_block
      context_mapping: { }
      markup:
        value: 'blahblah sample text'
        format: content_editor
      region: top
      weight: 0
      uuid: 6883fa33-5823-47c7-805f-03b235b98733
  page_title: 'Terms of agreement'
page: some_id
.
.

Now, the config inspector, presents the above as correct (even though there is an unrelated error).

Today we had to create a second page, with its own variant. The new variant has identical structure (and is validated first due to the name).

variant_settings:
  id: block_display
  label: null
  weight: 0
  uuid: 80eafb0c-0fb5-4477-8c2a-f7d513f121d3
  blocks:
    b3ace827-eb83-47b0-961b-4fa42229cc79:
      id: custom_markup
      label: 'Eligibility criteria'
      label_display: '0'
      provider: custom_markup_block
      context_mapping: { }
      markup:
        value: 'blah blah some other text'
        format: content_editor
      region: top
      weight: 0
      uuid: b3ace827-eb83-47b0-961b-4fa42229cc79
  page_title: 'Eligibility criteria'
page: eligibility_criteria
.
.

While it is exactly the same concept, the second one I just added is considered correct, while the first one now shows

page_manager.page_variant.solution_terms_of_agreement-block_display:variant_settings.blocks.6883fa33-5823-47c7-805f-03b235b98733.markup   missing schema                       

What seems to happen is that config inspector calls eventually

public function checkValues($config_name) {
    $config_data = $this->configFactory->get($config_name)->get();
    return $this->checkConfigSchema($this->typedConfigManager, $config_name, $config_data);
}

which as you might imagine, iterates through the properties in a recursive way, gets down to the last element, searches for a type, validates etc.

Now starts the weird part. I think (though I might be wrong) that this happens with "extendable" schemas, like page_manager.block_plugin.* which allows other plugins to be defined.

When reaching down to the level of the plugin, we see this

(issue in progress because my browser crashes the image upload)

🐛 Bug report
Status

Active

Version

2.1

Component

Code

Created by

🇬🇷Greece dimilias

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.

No activities found.

Production build 0.71.5 2024