Error in calculateScaleDimensions breaks pages using that image

Created on 10 March 2025, 24 days ago

Problem/Motivation

I updated an image in the Dam and then synced with Drupal. On a page using that media, I'm getting WSOD and this error in the logs:
TypeError: Drupal\acquia_dam\EmbedCodeUrlBuilder::calculateScaleDimensions(): Argument #1 ($original_dimension) must be of type int, null given, called in /var/www/html/docroot/modules/contrib/acquia_dam/src/EmbedCodeUrlBuilder.php on line 146 in Drupal\acquia_dam\EmbedCodeUrlBuilder::calculateScaleDimensions() (line 175 of /var/www/html/docroot/modules/contrib/acquia_dam/src/EmbedCodeUrlBuilder.php).

Steps to reproduce

Working on steps to reproduce.

I'm using version 1.1.0-beta5 on Drupal 10.4.3, php 8.3.15.

I see that there were changes to this code in https://www.drupal.org/project/acquia_dam/issues/3340734 πŸ› Scale effect is setting bad parameters, does not return image Active , but I'm not sure yet if that's related.

πŸ› Bug report
Status

Active

Version

1.1

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States capysara

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

Comments & Activities

  • Issue created by @capysara
  • πŸ‡ΊπŸ‡ΈUnited States capysara

    I tried the Sync Metadata from /admin/content/media again, and this time it seemed to fix it. Is it possible that the first time I tried it there wasn't enough time between updating in Dam and trying to sync in Drupal? If that's the case, is there any way to make it fail more gracefully?

Production build 0.71.5 2024