Problem/Motivation
I'm migrating from media_acquiadam to acquia_dam.
I already ran into this issue on the problems of migrating a catch-all media type into the acquia_dam framework: #3565073: Migration to acquia_dam module fails for media type that references pdf and other files
While that new drush command is great, I was hoping to just use the "Acquia DAM: Generic" plugin for the "asset source type". This was actually recommended by Acquia support and I convinced myself tit was the easiest approach.

Except I realized this won't work. The "Acquia DAM: Generic" AssetMediaSource plugin only works if the media type is named acquia_dam_generic_asset. That because the media solver has that media type hardcoded:
// 3. Finally fallback to the 'Generic' media type as a last resort.
return $result ?? $this->entityTypeManager->getStorage('media_type')->load('acquia_dam_generic_asset');
It should instead hardcode the asset type and figure out what media type uses that asset type in its source plugin.
Steps to reproduce
Try to use the Acquia DAM: Generic asset type for a media type that isn't named acquia_dam_generic_asset.
The media type resolver will never resolve anything to your generic media type.
That is unless the files in the dam happen to meet the search criterion ft:{'generic_binary'}. But that's not really what we're looking for is it.
Proposed resolution
The media type resolver should instead hardcode the asset type and figure out what media type uses that asset type in its source plugin.
Remaining tasks
User interface changes
API changes
Data model changes
| Comment | File | Size | Author |
|---|---|---|---|
| Screenshot 2026-02-05 at 11.53.43 AM.png | 20.66 KB | danflanagan8 |
Issue fork acquia_dam-3571816
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
Comment #2
danflanagan8I'm calling this a major bug because it prevents me from migrating my site based on Acquia support's help.
Comment #4
danflanagan8I opened an MR that I think should work. I still want to dd a test.
Comment #5
danflanagan8The kernel test for the media type resolver started failing because in that test the generic media type is not named
acquia_dam_generic_asset! So that acts a lot like our fail test, proving that this wasn't really working before.I've updated a couple null assertions in that test to expect the generic media type instead.
Hopefully none of the other tests fail. That's the only one I ran locally.
Comment #6
pavlosdanJust chiming in to say that we noticed the generic asset type stop working as well during the migration which is also a blocker for us.
Comment #9
rajeshreeputraMerged!