Project

General

Profile

Actions

Bug #62480

closed

Deleting a file with broken references via BE module not possible

Added by Cornel Boppart about 10 years ago. Updated about 6 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
File Abstraction Layer (FAL)
Target version:
Start date:
2014-10-26
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
5.4
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

Description

A file with broken FAL references cannot get deleted via the TYPO3 backend module File>Filelist. Such broken references for instance could occure after a manual data migration/import or deletion of one or more referenced records by executing db queries via command line.
Currently, a fatal error occures in cause of that $shortcutRecord is NULL and not type of array but is passed as the second argument of method \TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIconForRecord().

A redactor which only has access to files via BE module wouldn't be able to delete such a physical file but would see a thrown error [1].

This patch [3] will solve this issue by deleting the file with corrupt relations anyway and outputting a common flash message by informing about there were broken references [2].

[1] error-fileWithBrokenReferences.png
[2] info-FileWithBrokenReferences.png
[3] deleteFileWithBrokenReferences.png


Files

error-fileWithBrokenReferences.png (91.8 KB) error-fileWithBrokenReferences.png Cornel Boppart, 2014-10-26 19:45
info-FileWithBrokenReferences.png (14.2 KB) info-FileWithBrokenReferences.png Cornel Boppart, 2014-10-26 19:45
deleteFileWithBrokenReferences.patch (7.21 KB) deleteFileWithBrokenReferences.patch Cornel Boppart, 2014-10-26 19:45
onSuccess-fileWithBrokenReferences.png (25.7 KB) onSuccess-fileWithBrokenReferences.png Info message after a successful deletion Cornel Boppart, 2014-10-27 09:34
Actions #1

Updated by Gerrit Code Review about 10 years ago

  • Status changed from New 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/33562

Actions #2

Updated by Gerrit Code Review about 10 years 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/33562

Actions #4

Updated by Gerrit Code Review about 10 years 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/33562

Actions #5

Updated by Frans Saris about 10 years ago

Is running the update references commandant in the DB tools module not enough to cleanup the references?

Actions #6

Updated by Cornel Boppart about 10 years ago

Frans Saris wrote:

Is running the update references commandant in the DB tools module not enough to cleanup the references?

Updating the reference index does not help in this case. Apart from that, the System Module with all the DB tools inside is accessible for admins only.

To reproduce the error or testing the patch you can do this following few steps:
  1. Create an image or textpic element
  2. Add an image to that element and save
  3. Now, delete the tt_content record from DB via command line or e.g. phpmyadmin
  4. Go to Module File>Filelist in Backend and try to delete that image which was added to the content element
Actions #7

Updated by Gerrit Code Review about 10 years 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/33562

Actions #8

Updated by Gerrit Code Review almost 10 years 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/33562

Actions #9

Updated by Gerrit Code Review almost 10 years 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/33562

Actions #10

Updated by Gerrit Code Review almost 10 years 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/33562

Actions #11

Updated by Gerrit Code Review almost 10 years 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/33562

Actions #12

Updated by Gerrit Code Review almost 10 years ago

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

Actions #13

Updated by Wouter Wolters almost 10 years ago

  • Status changed from Under Review to Resolved
Actions #14

Updated by Benni Mack about 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF