Task #50876

Handling of deleted files in FAL

Added by Frans Saris about 6 years ago. Updated almost 4 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
File Abstraction Layer (FAL)
Target version:
-
Start date:
2013-08-06
Due date:
% Done:

100%

TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

Handling of deleted files in FAL

There are 2 ways files can get deleted:

  1. Delete a file directly in OS filesystem
  2. 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.

Issue: #50827 Introduce handling of missing files http://forge.typo3.org/issues/50827

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
When a file gets deleted then:
  • 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.

Consequences

The sys_file.deleted can be dropped from database table and the property should be removed from TCA


Subtasks

Task #50827: Introduce handling of missing filesClosed

Bug #51562: sys_file records marked as deleted crash file list (AKA: remove sys_file.deleted flag)ClosedErnesto Baschny

Bug #51698: Delete sys_file entry when a file is deletedClosed


Related issues

Related to TYPO3 Core - Bug #50531: Deleted state is not persisted in file objects Closed 2013-07-29
Related to TYPO3 Core - Bug #48336: sys_file record doesn't get flagged as delete after deleting a file Rejected 2013-05-17
Related to TYPO3 Core - Feature #48182: File-Indexer doesn't flag missing files as deleted Closed 2013-05-14
Related to TYPO3 Core - Bug #48893: Deleting files with references?! Closed 2013-06-05
Related to TYPO3 Core - Task #51838: Delete all processed files when a sys_file gets deleted Closed 2013-09-08
Related to Media Management - Support #51988: How should I handle deleted files? Closed 2013-09-13
Related to TYPO3 Core - Feature #59312: No possibility to remove missing indexed files from DB Accepted 2014-06-03
Blocks Media Management - Bug #52215: Delete and massDelete do not delete variant files Closed 2013-09-24

History

#1 Updated by Ernesto Baschny almost 6 years ago

  • Status changed from New to Accepted
  • Estimated time set to 0.00 h

#2 Updated by Steffen Ritter almost 6 years ago

  • Status changed from Accepted to Needs Feedback
  • Estimated time set to 0.00 h

Frans, what is missing here?

#3 Updated by Frans Saris almost 6 years ago

This is not yet implemented

  • When a admin tries to deleted a file that has references he will be asked if he wants to delete al the references

And a cleanup function needs to be created to delete sys_file records that are flagged as missing (and all references).

#4 Updated by Alexander Opitz over 5 years ago

  • Status changed from Needs Feedback to New
  • Estimated time set to 0.00 h

#5 Updated by Alexander Opitz over 5 years ago

  • Estimated time deleted (0.00 h)

#6 Updated by Alexander Opitz almost 4 years ago

  • Status changed from New to Closed
  • translation missing: en.field_remaining_hours deleted (0.0)

All subtasks are resolved, spoke with Frans and he gave ok to close this issue.

Also available in: Atom PDF