Getting error when download and sync option enabled with existing assets.

Created on 22 March 2025, 16 days ago

Problem/Motivation

When the 'Download and Sync' option is enabled with existing assets in the Acquia DAM system, an error is produced. The error is pointing towards a null object being called for getCacheTags() method in ImageFormatter.
The error is as follow:
Error: Call to a member function getCacheTags() on null in Drupal\image\Plugin\Field\FieldFormatter\ImageFormatter->viewElements() (line 241 of core/modules/image/src/Plugin/Field/FieldFormatter/ImageFormatter.php).
This issue restricts the expected functionality of downloading assets, inevitably affecting the user experience.

Steps to reproduce

  • Install Drupal 11.1.x/10.4.x and Acquia DAM 1.1.0.
  • Configure Acquia DAM.
  • Create a content type with a media field with DAM Image bundle selected.
  • Create content with DAM Image assets and verify assets are served from the URL.
  • Navigate to /admin/structure/media/manage/acquia_dam_image_asset.
  • Click on 'Download and sync assets' button.
  • Check the 'Download and sync assets' checkbox.
  • Save DAM Image media type.
  • Visit the page having the DAM Image media.

Post these steps, the error is observed. Remedial action is needed to address this bug to ensure users can download and sync DAM Image media without any issues.

🐛 Bug report
Status

Active

Version

1.1

Component

Code

Created by

🇮🇳India rajeshreeputra 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