Handle deleted assets

Created on 9 October 2024, 3 months ago

Problem/Motivation

When an asset is deleted in Cloudinary, after it has been used in Drupal in a media entity, a Cloudinary\Api\Exception\NotFound exception is thrown wherever the media entity is loaded.

Steps to reproduce

  1. Create a Cloudinary media entity
  2. Delete the asset in Cloudinary
  3. View the media entity

Proposed resolution

The CloudinaryAssetHelper::loadAssetByPublicId() method should catch the error and return NULL if the assets is not returned by the Cloudinary API.

🐛 Bug report
Status

Active

Version

3.0

Component

Code

Created by

🇧🇪Belgium klaasvw

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