Project

General

Profile

Actions

Bug #72539

closed

Extbase: sys_file_reference not deleted with repository-function

Added by Felix Herrmann almost 9 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Extbase
Target version:
-
Start date:
2016-01-05
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
7
PHP Version:
5.6
Tags:
sys_file, sys_file_reference, extbase
Complexity:
Is Regression:
No
Sprint Focus:

Description

The sys_file_reference is not updated if detach a file from an objectstorage. If you try to delete the sys_file_reference with the repository, it tries to delete the sys_file with the uid from the sys_file_reference.

private function detachFilerefernce(\TYPO3\CMS\Extbase\Domain\Model\FileReference $file) {
$fileRepository = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Resource\\FileRepository');
$ref = $fileRepository->findByUid($file->getUid());
$ref->delete();

Actions #1

Updated by Susanne Moog over 4 years ago

  • Status changed from New to Closed

There is no core repository for file references, only for files - and deleting via that repository should delete the file (not a reference).

This looks like an implementation problem in a custom project - for help with these please ask on slack. If you think this is a bug, please reopen the issue.

Actions

Also available in: Atom PDF