TypeError on EmbedCodeUrlBuilder on new revision update for an existing asset/image on Acquia DAM

Created on 17 January 2025, 3 months ago

Problem/Motivation

On updating a new version for an image/asset on Acquia DAM, the drupal cron run produces the following error:

[error] TypeError: Drupal\acquia_dam\EmbedCodeUrlBuilder::getDimensionValue(): Argument #1 ($number) must be of type int, null given, called in /var/www/html/docroot/modules/contrib/acquia_dam/src/EmbedCodeUrlBuilder.php on line 135 in Drupal\acquia_dam\EmbedCodeUrlBuilder::getDimensionValue() (line 196 of /var/www/html/docroot/modules/contrib/acquia_dam/src/EmbedCodeUrlBuilder.php) #0 /var/www/html/docroot/modules/contrib/acquia_dam/src/EmbedCodeUrlBuilder.php(135): Drupal\acquia_dam\EmbedCodeUrlBuilder::getDimensionValue()
#1 /var/www/html/docroot/modules/contrib/acquia_dam/src/StreamWrapper/AcquiaDamStreamWrapper.php(416): Drupal\acquia_dam\EmbedCodeUrlBuilder::mapImageEffects()
#2 /var/www/html/docroot/modules/contrib/acquia_dam/src/StreamWrapper/AcquiaDamStreamWrapper.php(322): Drupal\acquia_dam\StreamWrapper\AcquiaDamStreamWrapper->loadAsset()
#3 /var/www/html/docroot/modules/contrib/acquia_dam/src/Plugin/Field/FieldType/ComputedEmbedCodes.php(54): Drupal\acquia_dam\StreamWrapper\AcquiaDamStreamWrapper->getExternalUrl()
#4 /var/www/html/docroot/core/lib/Drupal/Core/TypedData/ComputedItemListTrait.php(34): Drupal\acquia_dam\Plugin\Field\FieldType\ComputedEmbedCodes->computeValue()
#5 /var/www/html/docroot/core/lib/Drupal/Core/TypedData/ComputedItemListTrait.php(43): Drupal\acquia_dam\Plugin\Field\FieldType\ComputedEmbedCodes->ensureComputedValue()
#6 /var/www/html/docroot/modules/contrib/ckeditor_mentions/src/MentionEventDispatcher.php(91): Drupal\acquia_dam\Plugin\Field\FieldType\ComputedEmbedCodes->getValue()
#7 /var/www/html/docroot/modules/contrib/ckeditor_mentions/src/MentionEventDispatcher.php(48): Drupal\ckeditor_mentions\MentionEventDispatcher->getMentionsFromEntity()
#8 /var/www/html/docroot/modules/contrib/ckeditor_mentions/ckeditor_mentions.module(17): Drupal\ckeditor_mentions\MentionEventDispatcher->dispatchMentionEvent()
#9 [internal function]: ckeditor_mentions_entity_update()

Steps to reproduce

  1. Upload a revision to image/asset in Acquia DAM.
  2. Run Cron on Drupal Backend to sync the Acquia DAM new updates on Drupal
  3. It results in a TypeError

Proposed resolution

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇮🇳India shubhamgoel Delhi

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