#40925Localization of FAL file relations in filelinks CE throws Exception
Description
Tested on a 6.0-dev installation based on an almost current master from Git, with some added cherry-picked FAL changes on top (that are in review right now and will hopefully be merged soon).
- Create a content element of type filelinks in default language
- add 1+ files as FAL file relations and save
- localize that whole content element (Frontend now shows the content in both languages)
- edit the localized record and click the “localize” button (see arrow in screenshot)
As soon as this button is clicked once, TYPO3 throws the following Exception when rendering this page in the localized language in the Frontend.
Hiding the whole translated CE again solves the problem with the Exception, but doesn’t allow us to localize the file relations.
PHP Fatal error: Uncaught exception 'InvalidArgumentException' with message 'No file found for given UID.' in /path/to/typo3/sysext/core/Classes/Resource/ResourceFactory.php:258
Stack trace:
#0 /path/to/typo3/sysext/core/Classes/Resource/FileReference.php(102): TYPO3\\CMS\\Core\\Resource\\ResourceFactory->getFileObject('0')
#1 [internal function]: TYPO3\\CMS\\Core\\Resource\\FileReference->__construct(Array)
#2 /path/to/typo3/sysext/core/Classes/Utility/GeneralUtility.php(4151): ReflectionClass->newInstanceArgs(Array)
#3 /path/to/typo3/sysext/core/Classes/Resource/ResourceFactory.php(461): TYPO3\\CMS\\Core\\Utility\\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\...', Array)Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.