Prevent crashing on file move when file is not found, fix schema bugs

Created on 21 November 2023, about 1 year ago
Updated 14 May 2024, 7 months ago

Problem/Motivation

When a file is missing on the file system, it crashes when moving the file and the batch process stops.

Steps to reproduce

  1. Manually delete a file from the files folder
  2. Start the move process
  3. The process will throw an error and stop

There are also significant bugs in the original filefield_paths_filefield_paths_process_file() code.

It gets $temporary_scheme_name and $source_scheme_name incorrectly, causing the file move/rename not to happen at all in some cases.

This is fixed by using StreamWrapperManager::getScheme(). See this commit on the MR.

Proposed resolution

Adding a try-catch around the move process, fix the code to correctly get the schema names.

Remaining tasks

Review the MR

🐛 Bug report
Status

Needs review

Version

1.0

Component

Code

Created by

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