Problem/Motivation
When assets are deleted in Acquia DAM (Widen Collective), they are not automatically unpublished on the Drupal website. This creates a challenge for users, as there is currently no way to identify which media assets have been deleted in Widen from the Drupal end.
Additionally, the following error continues to be logged in dblog/syslog.
Log #1
Type: acquia_dam
Message: "Client error: `GET https://api.widencollective.com/v2/assets/beefad34-ea27-4bbf-a2f8-19258e288670?expand=asset_properties,embeds,file_properties,metadata,metadata_info,metadata_vocabulary,security,thumbnails` resulted in a `404 Not Found` response: { "error": true, "response_code": 404, "error_message": "Asset with id 'beefad34-ea27-4bbf-a2f8-19258e288670' was (truncated...)"
Log #2
Type: acquia_dam
Message: "Following error occurred while trying to get asset from dam. Asset: beefad34-ea27-4bbf-a2f8-19258e288670, error: API responded with status: 404. If the issue persist contact the site admin. Error message: Client error: `GET https://api.widencollective.com/v2/assets/beefad34-ea27-4bbf-a2f8-19258e288670?expand=asset_properties,embeds,file_properties,metadata,metadata_info,metadata_vocabulary,security,thumbnails` resulted in a `404 Not Found` response: { "error": true, "response_code": 404, "error_message": "Asset with id 'beefad34-ea27-4bbf-a2f8-19258e288670' was (truncated...)"
Steps to reproduce
- Log in to the Acquia DAM (Widen) dashboard.
- Upload an asset of type image, PDF, or document and ensure the asset is uploaded successfully.
- Install Drupal and the Acquia DAM module.
- Log in to Drupal as an admin.
- Create or edit an existing content type to add a media field with Acquia DAM media types (bundles).
- Create content and add DAM media.
- Verify that assets/media render correctly on the content.
- Back in the Acquia DAM (Widen) dashboard, delete any asset that was used in the content.
- Clear the cache and execute the cron job.
- View the content; the asset is missing, and error logs appear in dblog/syslog.
Proposed resolution
Update Acquia DAM module to handle deleted DAM asset in Drupal by unpublishing them, adding status as deleted in Acquia DAM(widen) same as show in issue
here
๐
Handling media items when their asset gets unavailable in Widen
Postponed
.
Update the Acquia DAM module to handle deleted DAM assets in Drupal by automatically unpublishing them. Additionally, add a status indicating that the asset has been deleted in Acquia DAM (Widen). This functionality is shown in issue
#3443055
๐
Handling media items when their asset gets unavailable in Widen
Postponed
.