Handling of deleted files in FAL
Handling of deleted files in FAL¶
There are 2 ways files can get deleted:
- Delete a file directly in OS filesystem
- A file gets deleted in T3 Back-End
1. Delete a file directly in OS filesystem¶
When a file is deleted outsite of TYPO3 the indexer will set a 'missing' flag
so FAL nows the file isn't present anymore.
When the file is put back the indexer will reset the 'missing' flag so everything is back as it was.
2. A file gets deleted in T3 Back-End¶
- An editor can only delete files that have no references
- When a admin tries to deleted a file that has references he will be asked if he wants to delete al the references
- Physical file gets deleted
- All processed files get deleted (files + databaserecords)
- All related sys_file_reference recored get deleted (not flagged deleted but realy deleted)
- The sys_file record is deleted (not flagged as deleted)
Some background info¶
We want to keep the sys_files as much as posible in sync with the filesystem/storage. But keep sys_file_references, where is makes sense, the posibility to revert to latest state.
So deleted file relations get first flagged as deleted so we can use history to revert this. But when file is realy deleted this doesn't make sense anymore because the file isn't there anymore.
Only the admin gets the option to delete files with references because the file can be referenced in parts of the treeor in workspaces where the editor has no access.
The sys_file.deleted can be dropped from database table and the property should be removed from TCA