hook_media_presave() gets invoked on both media_acquiadam and acquia_dam during migration

Created on 16 January 2025, 6 days ago

Problem/Motivation

When migrating content, media gets saved, causing both of the hook_media_presave hooks to fire, resulting in the modules overriding each other.

Steps to reproduce

  1. Have a umami (or similar demo site) installed
  2. Install media_acquiadam, media_acquiadam_example & media_library
  3. Authenticate site in the configuration and then authorize the user
  4. Add some DAM assets to the local site, using Acquia DAM Image.
  5. Checkout the ACMS 3570 branch. Ensure you have acquia_dam 1.1 as well.
  6. Enable acquia_dam module
  7. goto the migration page: /admin/acquiadam/migration
  8. Perform the migration
  9. step through seeing media_acquiadam hooks firing

Proposed resolution

use hook_module_implements_alter and unset implementations of media_acquiadam

Remaining tasks

Create MR with required changes.

📌 Task
Status

Active

Version

1.1

Component

Code

Created by

🇮🇳India chandu7929 Pune

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024