CoreCommunity ExtensionsDistributionsFeature-RequestsTYPO3 6.2 Projects (+)(Archived Projects)

Bug #52236

Fatal error when record is hidden

Added by Dirk Wenzel almost 2 years ago. Updated almost 2 years ago.

Status:Resolved Start date:2013-09-24
Priority:Should have Due date:
Assigned To:- % Done:

0%

Category:-
Target version:1.1.0

Description

When setting the field hidden and saving the record an exception is thrown:

#1314354065: Could not find row with uid "186" in table sys_file (More information)

RuntimeException thrown in file
/var/www/typo3_src-6.1.5/typo3/sysext/core/Classes/Resource/AbstractRepository.php in line 195.

18 TYPO3\CMS\Core\Resource\AbstractRepository::findByUid("186")

/var/www/typo3_src-6.1.5/typo3/sysext/core/Classes/Resource/ResourceFactory.php:
00340:     /** @var FileRepository $fileRepository */
00341:     $fileRepository = GeneralUtility::makeInstance('TYPO3\CMS\Core\Resource\FileRepository');
00342:     $fileObject = $fileRepository->findByUid($uid);
00343:     if (!is_object($fileObject)) {
00344:      throw new \TYPO3\CMS\Core\Resource\Exception\FileDoesNotExistException('No file found for given UID.', 1317178604);

17 TYPO3\CMS\Core\Resource\ResourceFactory::getFileObject("186")

/var/www/html/typo3conf/ext/media/Classes/Form/FileUpload.php:
00081:   // Instantiate the file object for the whole class if possible.
00082:   if ($this->getValue()) {
00083:    $this->fileObject = \TYPO3\CMS\Core\Resource\ResourceFactory::getInstance()->getFileObject($this->getValue());
00084:   }

This occurs both in Media modul and File List Module.
TYPO3 Version 6.1.5
Media Version 1.1.0-dev


Related issues

related to Core - Bug #52245: Revert BackendUtility::BEenableFields in FAL Rejected 2013-09-25

History

#1 Updated by Fabien Udriot almost 2 years ago

  • Status changed from New to Accepted

It looks to be a regression introduced in TYPO3 6.1.5 apparently. Investigating...

#2 Updated by Gerrit Code Review almost 2 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/24040

#3 Updated by Gerrit Code Review almost 2 years ago

Patch set 3 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/24040

#4 Updated by Gerrit Code Review almost 2 years ago

Patch set 4 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/24040

#5 Updated by Gerrit Code Review almost 2 years ago

Patch set 5 for branch master has been pushed to the review server.
It is available at https://review.typo3.org/24040

#6 Updated by Fabien Udriot almost 2 years ago

  • Status changed from Accepted to Resolved

FYI, branch "develop" was merged into "master". Media is now inline with FAL when it comes about deleting a file. FAL does not have enables fields anymore (deleted, hidden, ...). The flag "hidden" was removed from the so called "enables fields" at the TCA level and was renamed to be "visible". A migration wizard still needs to be coded.

#7 Updated by Dirk Wenzel almost 2 years ago

Hi Fabien,
thanks a lot - especially for your hint about the changes in FAL.
I guess I will meet this issue again with my own extension media_frontend.

Cheers
Dirk

Also available in: Atom PDF