Actions
Bug #72539
closedExtbase: sys_file_reference not deleted with repository-function
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