Issue Bug Resolved

#93572Inline Relational Records are multiplicated at multiple simultaneous translations

Anonymous 02/23/21, 12:15 updated 10/25/26, 19:30

Description

*Problem:*
While translating an element to multiple languages at the same time, the inline records will multiplicate.
It does not happen with every record, but it can be reproduced in any case with 8 languages.

Testcase:

  1. Use a fresh TYPO3 9.5.x or 10.4.x installation.
  2. create 8 new Languages
  3. create a new page and translate it to all languages (one at a time)
  4. create a new record with an image or child elements (e.g. a gridelement as parent and text as child)
  5. click, in the list module , all translation flags of the records fast with the middle mouse button (open in new tab)
  6. check the new translation records

Sometimes the following error happens:

Localization failed; Source record sys_file_reference:3131 contained a reference to an original record that is not a default record (which is strange)! 

Tested with a Gridelement and a text & media element as child -> Translation of the gridelement got one to four children
Tested with a text & media element and an image -> Translations of the element have one to four images

I know this is an edge case, but it should not occur like this.

Reviews 2

Files 2

History 913

  1. Alexander Opitz commented and changed attached Screenshot_20211214_145606.png <span data-processor="relativetime" data-value="2021-12-15T11:49:42+00:00" > 12/15/21, 11:49 </span>

    For me this happens if the inline relation have “behaviour”: { “allowLanguageSynchronization”: 1 } configured.

    The DataMapProcessor::synchronizeInlineRelations tries to syncronize the relations while DataHandler copy is in process. Disabling this function and all went fine.

    The DataMapProcessor::synchronizeInlineRelations tries to get the persisted inline relations with `resolvePersistedInlineRelations` (Which are wrong ATM as they got copied from original but will get fixed after the mapping is done in DataHandler) and so they will land inside the $removeIds array and get removed inside this function.
    Afterwards new relations are tried to established but they seem to get in something like a loop. They also get attached to wrong reference object.

    Minimum requirements to get this happen:

    • default + 2 languages to get destroyed references in table
    • default + 3 languages to get the error message.

    Example from the sys_file_reference table after copy command. Yellow marked fields are wrong while synchronizeInlineRelations happens. The 2208 was the original reference they where copied from.

    Screenshot_20211214_145606.png

  2. Astrid Haubold commented <span data-processor="relativetime" data-value="2022-11-09T17:25:02+00:00" > 11/09/22, 17:25 </span>

    I can confirm this behaviour for TYPO3 v11 in a setup with 32 languages.
    It occours only for inline fields with allowLanguageSynchronization set to true in TCA as described.
    And only when copying in page tool. In list tool copying works as expected.

  3. Stefan L commented and changed attached SimpleDataHandlerController.diff TYPO3 Version 10 11 <span data-processor="relativetime" data-value="2023-11-20T09:17:22+00:00" > 11/20/23, 09:17 </span>

    Actually i try to resolve the problem by locking the request endpoint to avoid concurrency.
    I think that is not the perfect solution but it seems to resolve the problem in my case. See attached patch file.

  4. Łukasz Uznański commented <span data-processor="relativetime" data-value="2024-09-19T19:41:33+00:00" > 09/19/24, 19:41 </span>

    I can confirm this bug on v11, v12, current main. I know how to reproduce it, I can provide video.

    DB Doctor can’t find those records, but they are easy to find, I can provide SQL for that.

    Also, there is extension called https://github.com/wazum/transactional-data-handler and it fixes that issues, but causes other issues, I think that it’s too invasive.

  5. Gerrit Code Review pushed patch set 27 for main to change 62192 status New Under Review <span data-processor="relativetime" data-value="2026-10-13T14:24:39+00:00" > 10/13/26, 14:24 </span>

  6. Anonymous commented and changed status Under Review Resolved done 0 % 100 % <span data-processor="relativetime" data-value="2026-10-25T19:30:18+00:00" > 10/25/26, 19:30 </span>

    Applied in changeset commit:e2c4b58bdbf38526c55b62943699766f1eba5616.