Bug #84998

sys_language uid isn't updated when parent records sys_languge_uid changes

Added by Frans Saris about 1 year ago. Updated about 1 year ago.

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

0%

TYPO3 Version:
8
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

When you have a CE (tt_content) with some images created in the not default language and you change the sys_language_uid the relation handling + BE forms break.

When you translate the CE again opening the BE form of the CE will create new sys_language_uid records so you will see multiple file references appearing. Saving the CE will give an error:

ERROR Error handler    
Core: Exception handler (WEB): Uncaught TYPO3 Exception: #1486233164: Child record was not processed | RuntimeException thrown in file vendor/typo3/cms/typo3/sysext/core/Classes/DataHandling/Localization/DataMapProcessor.php in line 631.

Situation before sys_language_uid change:

 tt_content.sys_language_uid = 10
 sys_file_reference.uid = 1111
 sys_file_reference.sys_language_uid = 10
 sys_file_reference.l10n_parent = 0

After change of sys_language_uid:

 tt_content.sys_language_uid = 0
 sys_file_reference.uid = 1111
 sys_file_reference.sys_language_uid = 10
 sys_file_reference.l10n_parent = 0

Expected:

 tt_content.sys_language_uid = 0
 sys_file_reference.uid = 1111
 sys_file_reference.sys_language_uid = 0
 sys_file_reference.l10n_parent = 0

Note for others who run into this issue, after you changed the sys_language_uid to 0 and create translation you will see records appearing like:

 sys_file_reference.sys_language_uid = 10
 sys_file_reference.l10n_parent = 0

But this should be

 sys_file_reference.uid = 1111
 sys_file_reference.sys_language_uid = 0
 sys_file_reference.l10n_parent = 0
 sys_file_reference.sys_language_uid = 10
 sys_file_reference.l10n_parent = 1111

Due to the fact that sys_file_reference.sys_language_uid isn't correctly set to 0 for the CE in the default language the l10n_parent value for the translated CE's/file references is not correctly set.


Related issues

Related to TYPO3 Core - Bug #84618: Not possible to translate a record when allowLanguageSynchronization is set for relation field like 'image' in tt_content Accepted 2018-04-04
Duplicated by Grid Elements (former official tracker) - now moved to Gitlab! - Bug #86831: Children of a copy-pasted grid element do not update to the correct the sys_languag_uid Closed 2018-11-02

History

#1 Updated by Frans Saris about 1 year ago

  • Related to Bug #84618: Not possible to translate a record when allowLanguageSynchronization is set for relation field like 'image' in tt_content added

#2 Updated by Frans Saris about 1 year ago

  • Description updated (diff)

#3 Updated by Mathias Schreiber about 1 year ago

Changing languages just with the dropdown shouldn't be possible in the first place.
So the select box needs replacement with something that triggers a fullblown wizard.

#4 Updated by Helmut Hummel about 1 year ago

Mathias Schreiber wrote:

Changing languages just with the dropdown shouldn't be possible in the first place.
So the select box needs replacement with something that triggers a fullblown wizard.

I agree. Quick fix: hide the selector and let users copy the element into a different language instead (through page module wizard)

#5 Updated by Coders.Care Extension Team 7 months ago

  • Duplicated by Bug #86831: Children of a copy-pasted grid element do not update to the correct the sys_languag_uid added

Also available in: Atom PDF