I'm filing this here as it's a problem in all the Media type provider modules I've seen so far (Image, Document, Video embed field) and so is possibly a problem in all of them.
In the media bundle form's Type provider configuration section, there is a 'Source Foo field'. This has no 'none' option.
The problem here is because there's no neutral 'None' option, the element can show something that is incorrect.
Consider this scenario:
- user creates a media bundle and selects the provider, and saves the form
- user creates a field on the bundle
- user returns to the media bundle edit form. The select element shows the one field they have created, because there is only one option and that's how HTML select elements work. However, the configuration does not have this field set. The user could at this point believe that the media bundle has automatically picked up the field for this setting, and not bother saving the form.
This is a UI bug because the UI is misleading the user about the state of the system.
Comments
Comment #2
marcoscanoIf #2625854: Provide default source_field when creating new media entity bundles gets fixed soon, this will become obsolete
Comment #3
xenophyle CreditAttribution: xenophyle commentedIn case this helps someone Googling for answers...
This UI bug led to image style derivatives not being generated and instead the default media icon was displayed.
Comment #4
marcoscanoAfter the decision of making #2625854: Provide default source_field when creating new media entity bundles a core-only feature, I do see value in solving this UX issue, it is really confusing for first-time users.
Comment #5
woprrr CreditAttribution: woprrr as a volunteer and at NeoLynk commentedI suppose this is responsability of ThirdPartyForm providers to add an Empty option at Form element basis like
Same questions at end of my comment at ==> https://www.drupal.org/node/2918522#comment-12314272