-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
Problem
When applying DXPR CMS recipes via ddev drush recipe command, blocks with block_classes third party settings fail with validation errors like:
There were validation errors in block.block.dxpr_theme_views_block__case_studies_latest:
- third_party_settings.block_classes.block_class: 'block_class' is not a supported key.
- third_party_settings.block_classes: 'uuid' is a required key.
- third_party_settings.block_classes: 'langcode' is a required key.
- third_party_settings.block_classes: 'status' is a required key.
- third_party_settings.block_classes: 'dependencies' is a required key.
- third_party_settings.block_classes: 'id' is a required key.
- third_party_settings.block_classes: 'theme' is a required key.
- third_party_settings.block_classes: 'region' is a required key.
- third_party_settings.block_classes: 'weight' is a required key.
- third_party_settings.block_classes: 'provider' is a required key.
- third_party_settings.block_classes: 'plugin' is a required key.
- third_party_settings.block_classes: 'settings' is a required key.
- third_party_settings.block_classes: 'visibility' is a required key.
When selecting the case study recipe during site-installation in the UI (wizard) the block classes actually do get imported just fine despite warnings.
Affected Files
recipes/dxpr_cms_case_study/config/block.block.dxpr_theme_views_block__case_studies_latest.ymlrecipes/dxpr_cms_multilingual/config/block.block.dxpr_theme_languageswitcher.yml
Expected vs Actual Behavior
- Expected: Block classes should apply correctly when installing recipes via
ddev drush recipe - Actual: Validation errors prevent recipe installation
- Note: Block classes work perfectly fine during initial site installation via the web interface
Root Cause
The block_classes module schema validation expects the third party settings to conform to a specific structure, but the current configuration only includes the block_class property. The validation seems to expect the entire block entity structure within the third_party_settings, which is incorrect.
Workaround
Currently removing block_classes third party settings from affected block configs:
third_party_settings: {}Instead of:
third_party_settings:
block_classes:
block_class: 'container bg-primary-subtle py-4 px-3'Steps to Reproduce
- Install DXPR CMS
ddev drush site-install dxpr_cms_installer dxpr_cms_installer_keys.dxpr_key='YOUR_DXPR_API_KEY' -y - Try to apply any recipe containing blocks with block_classes third party settings:
ddev drush recipe ../recipes/dxpr_cms_case_study - Observe validation error
Environment
- Drupal version: 11.x
- DXPR CMS version: Latest
- Block Class module version: Latest
- Installation method: DDEV
Related Modules
- block_classes
- Drupal core recipes system
- Configuration management system
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels