- Issue created by @wim leers
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
Here's a patch that updates the existing test coverage to use the
text
field type instead of thestring
field type and it does not cause a test failure. That proves thatComponent::calculateDependencies()
is missing some additional logic.As the issue summary says: Look at how Drupal's existing Field UI handles this.
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
FYI: I marked this for a later phase because this is IMHO low-risk. It's a known TODO, with a known solution, in Drupal core.
Sibling follow-up issue 📌 [PP-1] Default props values should support files/images Postponed is much riskier, so is not marked for a later phase.
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
- 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
Sibling issue: 📌 `StringSemanticsConstraint::MARKUP`: agree how SDC prop JSON schema can convey it should be markup, and Needs review .
- Status changed to Active
about 1 month ago 1:34pm 18 March 2025 - 🇧🇪Belgium wim leers Ghent 🇧🇪🇪🇺
If #3467959-35: SDC and code component props should be able to receive HTML, editable in CKEditor 5 → is considered acceptable, we won't have to deal with the
FilterFormat
scenario described in this issue.But … the root problem remains. See the example of XB's
image
SDC:uuid: 1574ac0a-b1b6-4b32-aaef-a15c18d95aa0 langcode: en status: true dependencies: module: - media_library label: Image id: sdc.experience_builder.image provider: experience_builder source: sdc category: Other settings: plugin_id: 'experience_builder:image' prop_field_definitions: image: field_type: entity_reference field_storage_settings: target_type: media field_instance_settings: handler: 'default:media' handler_settings: target_bundles: image: image field_widget: media_library_widget default_value: { } expression: 'ℹ︎entity_reference␟{src↝entity␜␜entity:media:image␝field_media_image␞␟entity␜␜entity:file␝uri␞␟url,alt↝entity␜␜entity:media:image␝field_media_image␞␟alt,width↝entity␜␜entity:media:image␝field_media_image␞␟width,height↝entity␜␜entity:media:image␝field_media_image␞␟height}'
… while this contains
dependencies: module: - media_library
That is inadequate, it should have:
dependencies: config: - media.type.image module: - media_library
(due to its
field_instance_settings
)IOW:
\Drupal\experience_builder\Plugin\ExperienceBuilder\ComponentSource\GeneratedFieldExplicitInputUxComponentSourceBase::calculateDependencies()
must be updated.