Bug #97526
openPage properties with no l10n_mode are empty after translation
0%
Description
Upon translating a page, properties (e.g. categories, rowDescription) with missing l10n_mode are not copied to the translation as stated in the l10n_mode documantion.
https://docs.typo3.org/m/typo3/reference-tca/main/en-us/Columns/Properties/L10nMode.html
If this property is not set for a given field, the value of the default language record is copied over to the localized record on creation, the field value is then distinct from the default language record, can be edited at will and will never be overwritten by the DataHandler if the value of the default language record changes.
Instead the fields are empty (in DB its NULL). However, configuring the exact same fields in some custom table, they behave just fine as expected. I suspect that the distinction between pages and other tables in the DataHandler is causing the problem:
Here, for pages an empty new record is created while applying the $overrideValues which do not include the field values for fields without l10n_mode. For other tables a regular copyRecord is perfomed that copies the whole default language record (including field without l10n_mode) while appling the $overrideValues afterwards.
Why is this?
Note: This is also true for TYPO3 10.4
Reproduce:
- Setup a project with two languages
- Create and translate a category
- Create a page in default language setting values for (categories, rowDescription, description)
- Translate the page
Expected behavior:
- categories (no l10n_mode) --> translation should have the same categories selected as the default language record
- rowDescripton (no l10n_mode) --> translation should have the same value as the default language record
- description (l10n_mode: prefixLangTitle) --> translation should have the same value as the default language record with some prefix
Actual behavior:
- categories (no l10n_mode) --> empty
- rowDescrpiton (no l10n_mode) --> empty
- description (l10n_mode: prefixLangTitle) --> same value as the default language record with some prefix