Bug #89197

FileCollector and allowLanguageSynchronization for FAL fields

Added by Francois Suter 6 months ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
File Abstraction Layer (FAL)
Target version:
Start date:
2019-09-18
Due date:
% Done:

0%

TYPO3 Version:
9
PHP Version:
7.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

Consider a FAL field with behavior/allowLanguageSynchronization set to true. In general when FAL relations are rendered in the frontend, the files have been fetched using the \TYPO3\CMS\Frontend\Resource\FileCollector class.

Now when I translate some element with FAL relations and check the option "Value of default language", I would expect the FileCollector to know about this and to send me back the images from the original language.

Instead FileCollector checks if the element is a translation (by checking the existence of the _LOCALIZED_UID field in the incoming data) and tries to get the sys_file_reference records strictly related to the translations. If it finds none, it still overrides the list of items it found previously related to the original language (which is actually a waste of resources, it is useless to query something and override it anyway, so the logic in \TYPO3\CMS\Frontend\Resource\FileCollector::getFileReferences() could be also improved (on top of fixing this bug)).

Also available in: Atom PDF