The DAM media type Auto-Resolution feature in the ACMSDAM module (version 1.1.x and later) is a maintenance tool. This tool keeps the Drupal media library in synchronization with the original assets in Acquia DAM.
The Drupal website manages media by assigning each asset to a media type (for example, image, document, or video).
Asset replacement: A file is replaced in DAM (for example, an image is swapped for a PDF).
Asset conversion: A document is converted to a video file.
Initial errors: Media was imported into the wrong general type during the initial setup.
When these changes occur, the Drupal site might refer to a Video media entity that is actually a Document in Acquia DAM. This feature identifies and corrects these mismatches.
To use this feature, the Drupal application must meet these requirements:
The Acquia DAM module (version 1.1.x or later) must be enabled.
Drush must be installed for command-line tool operations.
The site must have active Acquia DAM API credentials configured.
The user must have appropriate permissions to run Drush commands.
This feature is available as a Drush command.
Command syntax:
drush acquia-dam:resolve-asset-media-type [--batch-size=<number>] [--media-type=<type>]Options:
--media-type: Specific media type to process (optional).
--batch-size: Number of media items to process per batch. Default: 50. Maximum: 200.
Examples:
drush acquia-dam:resolve-asset-media-type
drush acquia-dam:resolve-asset-media-type --batch-size=50
The Auto-Resolution process is necessary when:
Assets were initially assigned to generic Drupal Media Types and later split into more specific types. For example, a new dedicated GIF media type exists, and existing GIF assets must move from the Image media type.
Asset types changed in DAM where files were replaced or converted to different formats.
The Acquia DAM platform's asset handling is more granular than the document media types initially defined for import.
Recommended approach:
To correct all mismatches and ensure precise mapping to current Drupal Media Types, run the resolution process separately for each major type.
The tool performs an automated audit and correction process to ensure data integrity:
Scan all media: The tool checks every Acquia DAM media entity on the Drupal site.
Compare types: The tool obtains the current asset information from Acquia DAM and compares it with the assigned Drupal Media Type.
Automatic correction: If the tool finds a mismatch, it updates the media entity to the correct type.
Data preservation: The tool transfers existing field data, file references, and metadata to the new media entity.
Provide reporting: The tool delivers a detailed report on updated assets and specific changes.
When the tool corrects an asset media type, the following data changes occur:
| Feature | Details |
|---|---|
| Media Type | Changed to the correct, resolved type. |
| Field Data | Migrated to the new media type fields. |
| File References | The underlying file entity is preserved and reused. |
| Asset ID & Metadata | The Acquia DAM Asset ID, name, description, and other metadata are maintained. |
| Media Entity ID | The existing media entity ID is maintained. |
| Integration Links | Links and existing references to the media are maintained. |
API calls: Each media item requires one API call to Acquia DAM to obtain current asset metadata. Large numbers of items can impact API rate limits.
Batch size: The maximum batch size is 200 items. If a value exceeds 200, the system caps it to prevent memory issues and expiration.
Continuous monitoring: After you run the command, ensure that media displays correctly on pages and that all entity references work.
If this content did not answer your questions, try searching or contacting our support team for further assistance.
If this content did not answer your questions, try searching or contacting our support team for further assistance.