New Media Type with Identical Source as Existing Acquia DAM Media Type Incorrectly Links to Existing Media Type

Created on 25 March 2025, about 1 month ago

Problem/Motivation

Trying to add images of both kind(embedded and local) from Acquia DAM on the same website. After installing acquia_dam, when a new media type is created to serve Acquia DAM assets synced locally, it only embeds the assets from Acquia DAM. But if we switch the media type provided by Acquia DAM to serve locally synced images, the new media type also switches to local.

Steps to reproduce

  • Install Acquia DAM 1.1.0.
  • Configure Acquia DAM.
  • Create a new media type (lets say 'Synced DAM Image') with 'Acquia DAM: Image' as the media source.
  • Check the 'Download and sync assets' checkbox and save the media type.
  • Add the media type to a content field.
  • Create a node of the above content type and select an image from Acquia DAM of the new media type.
  • View the new content and inspect the image. It will be an URL embedded image.
  • Navigate to /admin/structure/media/manage/acquia_dam_image_asset.
  • Check the 'Download and sync assets' checkbox and save the media type.
  • View the above created content and check the image and it will now be served as a local image.
🐛 Bug report
Status

Active

Version

1.1

Component

Code

Created by

🇮🇳India ishan.gupta

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

Comments & Activities

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

    Hello Ishan,

    The expected behavior is that assets will be served from the Drupal file system when both media types, "Download & sync assets," are checked. To serve assets from an embedded URL, ensure that the "Download & sync assets" option is unchecked.

  • 🇮🇳India ishan.gupta

    Hey Vipin,
    For our use-case, we want to show both the assets, from embedded URL as well as Drupal file system, on the same website hence creating different media types. Both the media types should have its own functionalities.

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

    Hello @ishan.gupta,

    I'm trying to understand the scenario where you'd want to serve same asset from the same media source in two different media types for both the embed and download options.

  • 🇮🇳India vipin.mittal18 Greater Noida
  • 🇮🇳India vipin.mittal18 Greater Noida
  • 🇺🇸United States japerry KVUO

    For our use-case, we want to show both the assets, from embedded URL as well as Drupal file system, on the same website hence creating different media types. Both the media types should have its own functionalities.

    Each media type has their own source instance with configuration. However, I -think- I see the issue, I'm guessing the same asset ID cannot be put in two different Media Types... which wasn't really a use case we thought about.

    Vipin, I'd try seeing if you can get the same Asset to exist in two different media types.

  • 🇮🇳India vipin.mittal18 Greater Noida

    Yes Jakob, I’ve been able to replicate the issue. While we hadn’t considered this specific case earlier, I’m still trying to understand the real-world scenario where a customer would want to serve the same media source for both embed and download within a single application. That said, we do have the flexibility to serve different media sources for each option if needed.

  • 🇺🇸United States japerry KVUO

    Looked at this a little more, a few points:

    1) Assets should only exist in one media type at a time. This is a one-to-one relationship between DAM and Drupal, and I'm not sure it'd be a good idea to try to change that.

    2) You can get the functionality you're looking for in one media type by using the 'Download/Sync' option. Embed codes are part of the Entity View display field formatter, so there isn't a reason why you cannot enable either a new display with the embed code as the field display, or changing the download/sync field to disabled.

    For those reasons, marking this as 'won't fix'

Production build 0.71.5 2024