"remotely_referenced_thumbnail_image" cannot be overridden in Media Library

Created on 15 April 2025, 9 days ago

Problem/Motivation

After the rollout of 1.1.x – users reported that the default option for the "Embed" code switched to "Thumbnail Image of the Finalized Asset Version..." which has the machine name of remotely_referenced_thumbnail_image.

It looks like that even if we have a different display mode config the remotely_referenced_thumbnail_image option will always persist.

Steps to reproduce

1. Confirm you have a form display set up for the Media Library form display mode.
2. Set the default in that display mode to something other than remotely_referenced_thumbnail_image
3. Navigate to the media library and attempt to embed an image.
4. Observe that remotely_referenced_thumbnail_image is selected.

Proposed resolution

I think the code in /src/Form/EmbedSelectForm.php starting around line 183 is overriding things too strictly. The default value is only set in nested if statements and doesn't have a fallback. To me it seems like this code will always run, even if a different formatter is set.

I started to dig into this a bit to see if I could find some more info on the formatter/maybe try to patch but no luck so far. If this is truly an issue we'll need an issue to track anyway, so I've created this one. I will try to make a patch but we'll see if someone else gets to it first.

I think this was added in https://www.drupal.org/project/acquia_dam/issues/3515288 🐛 Newly created media type doesn't have media_library entity view display preconfigured. Active so I'm linking this issue.

🐛 Bug report
Status

Active

Version

1.1

Component

Code

Created by

🇺🇸United States jds1 Hudson Valley, NY

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024