Bug #48893

Deleting files with references?!

Added by Claus Harup about 2 years ago. Updated 6 months ago.

Status:Resolved Start date:2013-06-05
Priority:Must have Due date:
Assigned To:Frans Saris % Done:

100%

Category:File Abstraction Layer (FAL) Spent time: -
Target version:6.2.0
TYPO3 Version:6.1 Is Regression:No
PHP Version: Sprint Focus:On Location Sprint
Complexity:

Description

I have setup a simple editor - granting access to fileadmin/user_upload/

The editor is able to delete files that have references?!?!?!

See attachement for details....

Am I missing some configuration?

fal.png (52.6 kB) Claus Harup, 2013-06-05 17:21


Related issues

related to Core - Task #50876: Handling of deleted files in FAL New 2013-08-06

Associated revisions

Revision 7e50e179
Added by Armin Ruediger Vieweg 6 months ago

[BUGFIX] Prevent folder deletion with referenced files

Currently a folder can be deleted without any check if included files
are still in use anywhere within the website. This can lead to lost
files and can be harmful for the user. The patch adds a test if files
within a folder, which should be deleted, are still referenced and
prevents deleting it if files where found. The user is notified with a
warning shown above the file list.

Resolves: #48893
Releases: master, 6.2
Change-Id: If1c79d86e1f6c7a32a6a3e94e639951f882302d7
Reviewed-on: http://review.typo3.org/36413
Reviewed-by: Ingo Schmitt <>
Tested-by: Ingo Schmitt <>
Reviewed-by: Oliver Klee <>
Reviewed-by: Nicole Cordes <>
Tested-by: Nicole Cordes <>
Reviewed-by: Armin Ruediger Vieweg <>
Tested-by: Andrea Herzog-Kienast <>
Reviewed-by: Thomas Deuling <>
Tested-by: Thomas Deuling <>
Reviewed-by: Jan Helke <>
Tested-by: Oliver Klee <>
Reviewed-by: Anja Leichsenring <>
Tested-by: Anja Leichsenring <>

Revision ff736366
Added by Armin Ruediger Vieweg 6 months ago

[BUGFIX] Prevent folder deletion with referenced files

Currently a folder can be deleted without any check if included files
are still in use anywhere within the website. This can lead to lost
files and can be harmful for the user. The patch adds a test if files
within a folder, which should be deleted, are still referenced and
prevents deleting it if files where found. The user is notified with a
warning shown above the file list.

Resolves: #48893
Releases: master, 6.2
Change-Id: If1c79d86e1f6c7a32a6a3e94e639951f882302d7
Reviewed-on: http://review.typo3.org/36577
Reviewed-by: Armin Ruediger Vieweg <>
Reviewed-by: Nicole Cordes <>
Tested-by: Nicole Cordes <>

History

#1 Updated by Frans Saris almost 2 years ago

When he tries to delete the file he gets a error message that it isn't posible because file is in use.

#2 Updated by Claus Harup almost 2 years ago

Hi Frans

I found out that that was the case, but would it not be more userfriendly if the deleteicon wasnt even there?

/Claus

#3 Updated by Ernesto Baschny almost 2 years ago

  • Target version set to 6.2.0

Not more user-friendly, because it would look like a "bug" ("Where is the delete option?? I'll report that on the core bug tracker...") instead of explaining why he cannot delete.

But I agree that the user interface could be improved in this area, will try to get some input from the UX team on that. thanks for bringing it up.

#4 Updated by Philipp Gampe almost 2 years ago

IMHO there should be the icon, but it should not be linked to the action, but rather to an JS pop (onclick) that explains the reason why it is not possible to delete the file.

#5 Updated by Sebastian Fischer about 1 year ago

Currently you get the following message if you try to delete a referenced file.

File not deleted
The file cannot be deleted since it is still used at the following places:
TCA Test [/Home/]

Do we need more informations for the editor?

#6 Updated by Andrea Herzog-Kienast 6 months ago

  • Assigned To set to Frans Saris

You can delete a file with references!
If you have a folder structure like

folder
-- subfolder
--- 3subfolder

The 3subfolder contains files which are used in content elements and are referenced.
If you delete the parent folder "folder" all 3 folders are deleted - even if there are referenced files in the folder.

#7 Updated by Frans Saris 6 months ago

  • Is Regression set to No
  • Sprint Focus set to On Location Sprint

#8 Updated by Frans Saris 6 months ago

  • Status changed from New to In Progress

#9 Updated by Gerrit Code Review 6 months ago

  • Status changed from In Progress to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/36413

#10 Updated by Gerrit Code Review 6 months ago

Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/36413

#11 Updated by Gerrit Code Review 6 months ago

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/36413

#12 Updated by Gerrit Code Review 6 months ago

Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/36413

#13 Updated by Gerrit Code Review 6 months ago

Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/36413

#14 Updated by Gerrit Code Review 6 months ago

Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/36413

#15 Updated by Gerrit Code Review 6 months ago

Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/36413

#16 Updated by Gerrit Code Review 6 months ago

Patch set 8 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/36413

#17 Updated by Gerrit Code Review 6 months ago

Patch set 9 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/36413

#18 Updated by Gerrit Code Review 6 months ago

Patch set 10 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/36413

#19 Updated by Gerrit Code Review 6 months ago

Patch set 11 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/36413

#20 Updated by Gerrit Code Review 6 months ago

Patch set 12 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/36413

#21 Updated by Gerrit Code Review 6 months ago

Patch set 13 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/36413

#22 Updated by Armin Ruediger Vieweg 6 months ago

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

Also available in: Atom PDF