#45109Editing the file content of a file marked as deleted result in exception
Description
If you set deleted=1 for a file in sys_file, then open the file for local editing, you cannot save the file any more:
First of all, files should not exist on the local file system and at the same time keep their deleted flag in DB.
Second, even if they are listed, you should not be able to edit them.
Third, the deleted flag should be reset if you save the file, because you do want them to exist.
Uncaught TYPO3 Exception
#1317178604: No file found for given UID. (More information)
InvalidArgumentException thrown in file
/home/phil/t3-playground/t3-git/typo3/sysext/core/Classes/Resource/ResourceFactory.php in line 262.
6 TYPO3\CMS\Core\Resource\ResourceFactory::getFileObject("13")
/home/phil/t3-playground/t3-git/typo3/sysext/core/Classes/Resource/ResourceFactory.php:
00315: return $this->retrieveFileOrFolderObject($input);
00316: } elseif (\TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($input)) {
00317: return $this->getFileObject($input);
00318: } elseif (strpos($input, ':') > 0) {
00319: list($prefix, $folderIdentifier) = explode(':', $input);
5 TYPO3\CMS\Core\Resource\ResourceFactory::retrieveFileOrFolderObject("13")
/home/phil/t3-playground/t3-git/typo3/sysext/core/Classes/Utility/File/ExtendedFileUtility.php:
00442: */
00443: protected function getFileObject($identifier) {
00444: $object = $this->fileFactory->retrieveFileOrFolderObject($identifier);
00445: if (!is_object($object)) {
00446: throw new \TYPO3\CMS\Core\Resource\Exception\InvalidFileException('The item ' . $identifier . ' was not a file or directory!!', 1320122453);
4 TYPO3\CMS\Core\Utility\File\ExtendedFileUtility::getFileObject("13")
/home/phil/t3-playground/t3-git/typo3/sysext/core/Classes/Utility/File/ExtendedFileUtility.php:
00742: // for backwards compatibility: the combined file identifier was the path+filename
00743: $fileIdentifier = $cmds['target'];
00744: $fileObject = $this->getFileObject($fileIdentifier);
00745: // Example indentifier for $cmds['target'] => "2:targetpath/targetfolder/"
00746: $content = $cmds['data'];
3 TYPO3\CMS\Core\Utility\File\ExtendedFileUtility::func_edit(array)
/home/phil/t3-playground/t3-git/typo3/sysext/core/Classes/Utility/File/ExtendedFileUtility.php:
00255: break;
00256: case 'editfile':
00257: $result[$action][] = $this->func_edit($cmdArr);
00258: break;
00259: case 'upload':
2 TYPO3\CMS\Core\Utility\File\ExtendedFileUtility::processData()
/home/phil/t3-playground/t3-git/typo3/sysext/backend/Classes/Controller/File/FileController.php:
00128: } else {
00129: $this->fileProcessor->start($this->file);
00130: $this->fileData = $this->fileProcessor->processData();
00131: }
00132: }
1 TYPO3\CMS\Backend\Controller\File\FileController::main()
/home/phil/t3-playground/t3-git/typo3/tce_file.php:
00040: $SOBE = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\Controller\\File\\FileController');
00041: $SOBE->init();
00042: $SOBE->main();
00043: $SOBE->finish();
00044: ?>Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.