Problem/Motivation

Disallow of selecting default value for un-selected media types

test

test

test

Steps to reproduce

1. Standard profile installation
2. Add media type field for the any available Content types
3. Choose "Image" in "Media type" of the "Reference type" setting (check screens above)
4. Click on "Set default value", then click "Add media" button. And you will see that we can actually choose media for all media types (audio, document, remote video, video and image). Moreover we can save everything and default value will be available on form display page, and on view display page !
5. It's very important to follow steps above in the same order, because if after 4th step (after save of field settings) we will go back to the field settings -> we can delete default media, then click again "Add media" and now we can select medias only for selected media types.

Comments

kostyashupenko created an issue. See original summary.

ajinkya45’s picture

I followed the exact steps (without saving field settings), and the “Set default value → Add media” modal still only allowed image files (png, jpg, etc.). Looks like this issue has already been fixed. Tested on fresh Standard profile installation.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.