FileNotExistsException prevents user from saving entity when file has been removed from disk

Created on 22 July 2024, 4 months ago

Problem/Motivation

If a file gets removed from disk for whatever reason and a user tries to publish/unpublish an entity referencing that file, then file_access_fix will throw an exception on trying to move the file and the entity will not be updated. In some cases you won't be able to unpublish media that have missing files.

Steps to reproduce

  1. Create a media type with a file field
  2. Create an instance of that media type and upload a file
  3. Find the file on disk and delete it
  4. Try publish or unpublish the media entity

Proposed resolution

Unsure, maybe since the media item is considered broken the exception should be allowed to bubble up? Or, maybe the exception should be caught/logged and processing allowed to continue?

Remaining tasks

Feedback on whether this is an issue that needs to addressed or working as intended?

User interface changes

none

API changes

none

Data model changes

none

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇳🇿New Zealand code_brown

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