Components need to have empty props to be replaceable

Created on 2 April 2024, 9 months ago
Updated 21 April 2024, 8 months ago

When I copied the SDC component page-navigation to my theme, rendering of the page fail with an error Drupal\sdc\Exception\IncompatibleComponentSchema: Component "mytheme:page-navigation" is attempting to replace "radix:page-navigation", however component replacement requires both components to have schema definitions. v Drupal\sdc\ComponentPluginManager->alterDefinitions() (Ε™Γ‘dek 294 souboru /app/web/core/modules/sdc/src/ComponentPluginManager.php).

The error is misleading, as the actual issue isn't missing schema definition, but the fact, that the component doesn't have any props. When both radix:page-navigation and my copy have

props:
  type: object
  properties: {}

in their *.component.yml files it starts to work. This means that issue needs to be created, so the issue can be fixed in the core, but in the meantime, we need to update components so they are replaceable.

✨ Feature request
Status

Fixed

Version

6.0

Component

Code

Created by

πŸ‡¨πŸ‡ΏCzech Republic milos.kroulik

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