Bug #93572
openInline Relational Records are multiplicated at multiple simultaneous translations
0%
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:
- Use a fresh TYPO3 9.5.x or 10.4.x installation.
- create 8 new Languages
- create a new page and translate it to all languages (one at a time)
- create a new record with an image or child elements (e.g. a gridelement as parent and text as child)
- click, in the list module , all translation flags of the records fast with the middle mouse button (open in new tab)
- 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.
Files
Updated by Alexander Opitz almost 3 years ago
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.
Updated by Astrid Haubold about 2 years ago
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.
Updated by Stefan L about 1 year ago
- File SimpleDataHandlerController.diff SimpleDataHandlerController.diff added
- TYPO3 Version changed from 10 to 11
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.
Updated by Riccardo De Contardi 6 months ago
- Related to Bug #80944: Inline records are duplicated upon saving the master record added
Updated by Łukasz Uznański 2 months ago
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.