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 so I'm linking this issue.

CommentFileSizeAuthor
#3 acquia-dam-embed-code-3519360.mp43.29 MBjds1

Issue fork acquia_dam-3519360

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

jds1 created an issue. See original summary.

vipin.mittal18’s picture

Status: Active » Postponed (maintainer needs more info)

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.

jds1’s picture

StatusFileSize
new3.29 MB

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

vipin.mittal18’s picture

Status: Postponed (maintainer needs more info) » Active
rajeshreeputra’s picture

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.

becw’s picture

In addition to the "Thumbnail Image of the Finalized Asset Version..." option, Acquia DAM provides an "Original" option. On our site, neither of these should be available to editors, and we had to do gymnastics to remove them from the UI.

These options are hard-coded for images in \Drupal\acquia_dam\EmbedCodeFactory::getSelectOptions().

rajeshreeputra’s picture

Status: Active » Needs review

Requesting review.

rohan-sinha’s picture

Status: Needs review » Reviewed & tested by the community

lgtm

rajeshreeputra’s picture

Status: Reviewed & tested by the community » Fixed

MR merged!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

rajeshreeputra’s picture

Status: Fixed » Needs review

Requesting review.

rohan-sinha’s picture

Status: Needs review » Reviewed & tested by the community

lgtm

  • rajeshreeputra committed fd50efb8 on 1.1.x
    Resolve #3519360 "Make the media_library view display for all DAM media...
rajeshreeputra’s picture

Status: Reviewed & tested by the community » Fixed

MR merged!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.