- Merge request !144Resolve #3548311 "Fieldpropexpression multiple target bundles same field" → (Merged) created by wim leers
When altering the image component via the storage_prop_shape_alter()
hook, if multiple target bundles are added and different prop names are needed per media type. Then prop names are defined as an array, and they are keyed by the field name. However, if some media types share the same media source and thus the same field name, the prop name array's size does not match the bundle array's size. This causes the following error in FieldPropExpression:
In FieldPropExpression.php line 81:
A field property name must be specified for every field name, and in the same order.
ℹ︎entity_reference␟{src↝entity␜␜entity:media:acquia_dam_image_asset|custom_acquia_dam_image|image␝acquia_dam_image_item|acquia_dam_image_item|field_media_image␞␟src_with_alternate_widths|src_with_alternate_widths,alt↝entity␜␜entity:media:acquia_dam_image_asset|custom_acquia_dam_image|image␝acquia_dam_image_item|acquia_dam_image_item|field_media_image␞␟alt|alt,width↝entity␜␜entity:media:acquia_dam_image_asset|custom_acquia_dam_image|image␝acquia_dam_image_item|acquia_dam_image_item|field_media_image␞␟width|width,height↝entity␜␜entity:media:acquia_dam_image_asset|custom_acquia_dam_image|image␝acquia_dam_image_item|acquia_dam_image_item|field_media_image␞␟height|height}
It should be possible to map different prop names per bundle, even if multiple bundles share the same field name.
Validation fails due to array size mismatch between bundles and prop names, blocking the configuration.
Cannot support multiple media types with shared field names and distinct prop mappings.
Active
1.0
Shape matching
It denotes an issue that prevents porting of a contributed project to the stable version of Drupal due to missing APIs, regressions, and so on.
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.