Fatal error if thumbnail image does not exist

Created on 26 February 2025, 5 months ago

Problem/Motivation

I'm using the Media PDF Thumbnail formatter in a view. For some reason, one of the media items to be displayed is missing the thumbnail image. This results in a fatal error:

Uncaught PHP Exception ValueError: "Path cannot be empty" at [path]/web/modules/contrib/media_pdf_thumbnail/src/Plugin/Field/FieldFormatter/ImageFieldFormatterElementViewTrait.php line 108

When investigating the cause, I also noticed that there is an error fetching the image style in handleDerivative().

🐛 Bug report
Status

Active

Version

6.1

Component

Code

Created by

🇩🇪Germany mrshowerman Munich

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