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.
Issue fork radix-3437559
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3437559-components-need-to
changes, plain diff MR !84
Comments
Comment #3
milos.kroulik commentedpage-navigationcomponent is fixed, others should be checked and modified as needed.Comment #4
doxigo commentedThanks Milos, pushed the fix