#80152Filelist: File can not be deleted if it was reference once
Description
It is not possible to delete files that had been referenced in a record, e.g. a content element. Steps to reproduce:
- Upload a file in the file list
- Add a new content element (e.g. of type “textmedia”) and add this file (and save)
- Delete the file (reference) from the content element (and save)
- Try to delete the file in the file list
The file is not removed but a warning is shown:
File not deleted The file cannot be deleted since it is still used at the following places: [record:tt_content:15943]
I tried this with 8.6.0 and the current master. Both the same behaviour.
This happens because deleted file references are considered in the checks in the ExtendedFileUtility. Whether the sys_refindex must be updated when deleting a file reference or the deleted file reference must be ignored on the process in ExtendedFileUtility.