Project

General

Profile

Actions

Bug #89271

open

Inline (IRRE) records are not kept in sync on record save

Added by Markus Klein over 4 years ago. Updated 10 months ago.

Status:
Under Review
Priority:
Should have
Assignee:
-
Category:
DataHandler aka TCEmain
Target version:
-
Start date:
2019-09-25
Due date:
% Done:

0%

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

Description

Setup description

Table "project"

  • translatable
  • IRRE field "assignments" (l10n_mode = exclude)

Table "assignment"

  • not translatable
  • boolean flag "checked" (default 0)

Reproduction

  1. Create a project record and add an assignment in default language => project uid = 1, assignment record uid = 23
  2. Create a translation of the project record => project uid = 2, assignment record uid = 24 (assignments duplicated for the translation, but have no connection to the parent's assignment 23)
  3. Edit the project again (uid 23) and change the "checked" field to "1" in the assignment
  4. Save the project

Expected behaviour

The assignment associated with the translated project has a value of "1" for the "checked" field.
(The change in the default language has to be mirrored to the translations due to l10n_mode = exclude)

Seen behaviour

The value of the "checked" field of the assignment of the translated project stays unchanged (=0)

Impact

The editor in the Backend changes information in an inline child and wonders why things are not updated in the Frontend for translations.
The workaround for the editor would be to open each and every translation of the parent (project) and save it once.

Analysis

The DataHandler runs a preprocessing of the datamap with the DataMapProcessor.
In this step all inline children of the translations are purged and regenerated based on the default record's children.
In this phase though, the changed child (assignment) is not yet persisted. Hence, the new translation's children are generated based on old data.

We see two possible solutions:

  1. Merge the information of the updated assignment from the datamap with the values currently persisted in the database. (this might be very tricky)
  2. Defer the synchronization of the IRRE children of translations until the main datamap processing has been completed. (this is most like the way to go)

Related issues 3 (2 open1 closed)

Related to TYPO3 Core - Bug #88452: TCA field type inline ignores l10n_mode "exclude"New2019-05-28

Actions
Related to TYPO3 Core - Bug #87640: Keep language reference for associated l10n_mode=exclude childrenClosed2019-02-04

Actions
Related to TYPO3 Core - Bug #98050: Non translatable inline records only updates on second save.Under Review2022-07-28

Actions
Actions

Also available in: Atom PDF