File delete error after the file import

Created on 1 April 2024, about 1 year ago
Updated 20 May 2024, 11 months ago

Problem/Motivation

There is error like The file private://test_export.csv was not deleted because it does not exist. in the recent log messages After importing a file with prices.

Steps to reproduce

Import file with prices. Check the recent log messages, filter by 'file' type. Find the error in the list.

Proposed resolution

Remove unlink($file->getFileUri()); from PriceListItemImportForm::batchDeleteUploadedFile() as the file will be deleted in File::preDelete() in line \Drupal::service('file_system')->delete($entity->getFileUri()); the last one produces those error message in the logs.

🐛 Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

🇺🇦Ukraine khiminrm

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

Comments & Activities

Production build 0.71.5 2024