Bug #75850
closedExtbase sys_language_mode + l10n_mode exclude
0%
Description
If you have translated TCA records and some fields in them with l10n_mode set to "exclude" (e.g. for images that don't need to be translated) they are only returned by the images getter in the domain model of extbase in a non-default language if the config.sys_language_mode is set to "content_fallback".
If you set config.sys_language_mode to "strict", which you might need, if you don't want untranslated records to display in a non-default language, the images are not returned any more in a non-default language. The images getter returns an empty \TYPO3\CMS\Extbase\Persistence\ObjectStorage in this case. The rest of the strict behaviour works though. Untranslated records are not returned any more.
So I assume the strict behaviour is taken into account a bit too far here and should not be considered for fields in translated records with l10n_mode set to "exclude".
If there is more info to help to clear this up necessary, please tell me.
Updated by Matthias Krappitz over 8 years ago
Expected behaviour: the images should be shown in a non-default language no matter what the config.sys_language_mode is set to as long as they are set to l10n_mode "exclude" in TCA config, since this tells the system to use the data from the default language and not use anything from the translated record.
Updated by Ina Beckmann over 8 years ago
I can confirm the issue and want to add a new detail. Additionally the image is also not showing up in the second language if the record is not translated but set to sys_language_uid -1 (all). The sys_file_reference for this record gets sys_language_uid = 0 and is somehow not respected for frontend output in strict mode. When i directly change sys_language_uid for the sys_file_reference to -1 in the database the image gets rendered. Manipulating the sys_language_uid with TceMainHook after saving might be a (temporary) workaround.
Updated by Markus Klein over 8 years ago
- Status changed from New to Closed
- Target version deleted (
next-patchlevel)
Closing as duplicate