When I try to save using the MediaEntityDropzoneJsEbWidget, I get an error:
Undefined index: source_field in Drupal\dropzonejs_eb_widget\Plugin\EntityBrowser\Widget\MediaEntityDropzoneJsEbWidget->submit() (line 115 of modules/contrib/dropzonejs/modules/eb_widget/src/Plugin/EntityBrowser/Widget/MediaEntityDropzoneJsEbWidget.php
The code calling this is $bundle->getTypeConfiguration()['source_field']
I do not see source_field instantiated anywhere in the media_entity module, although the feature is referenced more generally in this issue #2625854: Provide default source_field when creating new media entity bundles.
As a workaround I manually edited my media_entity.bundle.image configuration YAML file, adding the source_field configuration, following the pattern in Media Pinkeye here.
Comments
Comment #2
jfrederick commentedI imagine this has to do with me not using the Media Entity Image module, which appears to set up the source_field for its included bundle.
Comment #3
primsi commentedManaged to fix that? My guess is that the media entity is not configured properly, as in missing the source_field mapping.
Comment #4
jfrederick commentedI fixed it for my own case with the manual YAML edit workaround I mentioned in #1.
I think maybe the source_field logic should be moved from the Media Entity Image module to the Media Entity module? For example, Media Entity Image module has Image::buildConfigurationForm(), which provides a UI to set the source_field. Users of Media Entity module do not have this.
Comment #5
phenaproximaThis is addressed by the patch #2722517: EB widget has no way to configure the bundle.