Project

General

Profile

Actions

Bug #97526

open

Page properties with no l10n_mode are empty after translation

Added by Martin Schulz over 2 years ago. Updated 7 months ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
DataHandler aka TCEmain
Target version:
-
Start date:
2022-05-02
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
11
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

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:

https://github.com/TYPO3/typo3/blob/main/typo3/sysext/core/Classes/DataHandling/DataHandler.php#L4749

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:

  1. Setup a project with two languages
  2. Create and translate a category
  3. Create a page in default language setting values for (categories, rowDescription, description)
  4. Translate the page

Expected behavior:

  1. categories (no l10n_mode) --> translation should have the same categories selected as the default language record
  2. rowDescripton (no l10n_mode) --> translation should have the same value as the default language record
  3. description (l10n_mode: prefixLangTitle) --> translation should have the same value as the default language record with some prefix

Actual behavior:

  1. categories (no l10n_mode) --> empty
  2. rowDescrpiton (no l10n_mode) --> empty
  3. description (l10n_mode: prefixLangTitle) --> same value as the default language record with some prefix
Actions

Also available in: Atom PDF