Project

General

Profile

Actions

Bug #41115

closed

Deleting a file is impossible after it has been used once

Added by Mario Rimann over 11 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
File Abstraction Layer (FAL)
Target version:
Start date:
2012-09-20
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
6.0
PHP Version:
5.3
Tags:
Complexity:
medium
Is Regression:
Sprint Focus:

Description

We encountered the following error, shown when trying to delete a single file in the filelist module:

File not deleted
The file cannot be deleted since it is still used at the following places:

Steps to reproduce:

- Login to the backend (tested as admin)
- Go to the filelist module
- Upload two files, e.g. graphics
- Go to the list module
- Create a content element of type Text/Images
- Add a FAL relation to one of the two uploaded images
- Save the Content Element
- Remove the image relation from the Content Element
- Save the Content Element
- Go back to the filelist module
- Try to delete the two files

Expected:

Both files can be deleted

Current Behaviour:

The file that was just uploaded and never used in a relation can be deleted without problems. The file that was temporarily used in a relation cannot be deleted and the above mentioned error message is shown.

Notes

- Deleting the whole Content Element completely doesn't solve the problem
- The problem can be reproduced with 6.0-dev from Git, tested with revision 415c0866faf

Actions #1

Updated by Oliver Hader over 11 years ago

  • Status changed from New to Accepted
  • Target version set to 6.0.0-RC1

The relation in sys_file_reference is still there, but set to "deleted". Besides that, the references index is wrong in that case.
In my opinion the sys_file_reference elements should not have the "deleted" flag but be deleted directly - the regular MM behaviour in TYPO3.

Actions #2

Updated by Oliver Hader over 11 years ago

  • Complexity set to medium
Actions #3

Updated by Gerrit Code Review over 11 years ago

  • Status changed from Accepted to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/15436

Actions #4

Updated by Gerrit Code Review over 11 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/15436

Actions #5

Updated by Benni Mack over 11 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #6

Updated by Riccardo De Contardi over 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF