Problem/Motivation
BEE writes its per-bundle settings into a node type's third-party settings (bee.module, bee_node_type_edit_form_submit()):
$node_type->setThirdPartySetting('bee', 'bee', $bee_settings)->save();
…but the module ships no config schema at all — there is no config/schema/*.schema.yml anywhere in the project (confirmed at HEAD; config/install exists, config/schema does not). Nothing declares node.type.*.third_party.bee.
Consequences on a site with a BEE-enabled bundle:
- The node type's config object fails validation.
$node_type->getTypedData()->validate()returns 12 violations. Because the third-party key has no schema, typed config falls back to the node type's own definition, producing not just'bee' is not a supported keybut a cascade of nonsense demands —'uuid' is a required key, 'name' is a required key, 'type' is a required key— insidethird_party_settings.bee:
[third_party_settings.bee.bee] 'bee' is not a supported key. [third_party_settings.bee] 'uuid' is a required key. [third_party_settings.bee] 'langcode' is a required key. [third_party_settings.bee] 'status' is a required key. [third_party_settings.bee] 'dependencies' is a required key. [third_party_settings.bee] 'name' is a required key. [third_party_settings.bee] 'type' is a required key. [third_party_settings.bee] 'description' is a required key. [third_party_settings.bee] 'help' is a required key. - Real interop breakage. On Drupal CMS, the
content_template_disable_previewECA rule errors on every Canvas ContentTemplate save for a BEE-enabled bundle, because it validates the node type. Worse, the rule'spreview_modewrite still lands despite the reported validation failure — so the failure is misleading as well as noisy. - Schema is required for correct typed-config handling generally (translation, validation,
config:inspect), and Drupal is progressively enforcing full validatability of config entities.
Steps to reproduce
- Install BEE, enable bookability on a content type (any
bookable_type), save. - Run
\Drupal::entityTypeManager()->getStorage('node_type')->load('<bundle>')->getTypedData()->validate()— 12 violations as above. - On Drupal CMS with Canvas: create a ContentTemplate for that bundle and save — the ECA rule errors.
Proposed resolution
Add config/schema/bee.schema.yml declaring the third-party settings BEE actually writes (keys observed on a live site: bookable, bookable_type, availability, payment, payment_default_value, type_id):
node.type.*.third_party.bee:
type: mapping
label: 'BEE settings'
mapping:
bookable:
type: boolean
label: 'Bookable'
bookable_type:
type: string
label: 'Bookable type (hourly or daily)'
availability:
type: string
label: 'Availability'
payment:
type: boolean
label: 'Payment enabled'
payment_default_value:
type: string
label: 'Default payment value'
type_id:
type: string
label: 'BAT unit type id'
(Maintainers should confirm the exact types/keys against the form — the above is derived from a live install.)
Remaining tasks
Confirm key list and types; add schema; ideally add a SchemaCheckTestTrait-based test so it can't regress.
User interface changes
None
API changes
None
Data model changes
None
Sponsorship
None
Comments