"remotely_referenced_thumbnail_image" cannot be overridden in Media Library

Created on 15 April 2025, 4 months 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

  • Issue created by @jds1
  • 🇮🇳India vipin.mittal18 Greater Noida

    Hello James,

    I'm not entirely sure I fully understand your point. Before responding based on assumptions, I'd appreciate a bit more clarification. It would be helpful if you could update the ticket with more details about the URLs you're navigating, along with some relevant screenshots.

  • 🇺🇸United States jds1 Hudson Valley, NY

    I added a screencast ! Hopefully this helps diagnose the issue. Thank you!

  • 🇮🇳India vipin.mittal18 Greater Noida
  • 🇮🇳India rajeshreeputra Pune

    The default view mode in CKEditor is configured for Drupal local media but does not apply to Acquia DAM media. This distinction arises because Drupal media utilizes view displays, whereas Acquia DAM media relies on embed codes (similar to image styles used for image media types in Drupal).

    I hope this clarifies the your concern.

Production build 0.71.5 2024