Warning: Undefined array key "thumbnail_width_metadata_attribute"

Created on 13 April 2023, over 1 year ago
Updated 15 August 2023, over 1 year ago

Problem/Motivation

On a new drupal 10.0 website, using this module to add a remote audio media triggers this warning.

Warning: Undefined array key "thumbnail_width_metadata_attribute" in Drupal\media\Entity\Media->getThumbnailWidth() (line 286 of core/modules/media/src/Entity/Media.php).

Drupal\media\Entity\Media->getThumbnailWidth() (Line: 157)

Steps to reproduce

Just install the module on a drupal 10.0 website and create a new remote audio media.
The media creation is working fine, the thumbnail is imported but this triggers the warning above.

Proposed resolution

Add the missing keys in media_remote_audio_media_source_info_alter.
(thumbnail_width_metadata_attribute and thumbnail_height_metadata_attribute)

Remaining tasks

Create a patch

πŸ› Bug report
Status

Closed: duplicate

Version

1.0

Component

Code

Created by

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

Comments & Activities

Production build 0.71.5 2024