Bug #89965
openCopied textmedia element with sys_file_reference that has its language changed, makes the Datahandler throw up
0%
Description
Steps to reproduce:
- Create a new Site Config with the languages "Default" (0) and "German" (1)
- Create a page A
- On page A, create a new textmedia element with a file reference.
- Translate page A and the textmedia element to german
- Now create a page B
- Translate page B to german
- Go to page A and copy the german localization of the textmedia element
- Go to page B and insert the textmedia element.
- Open up the newly copied textmedia element on page B and change the language of the element to "Default".
Internally, the textmedia tt_content elements sys_language_uid will now correctly. change from 1 to 0. But the file reference that belongs to this element will NOT be updated and still has the sys_language_uid 1.
We now have created a mess in the sys_file_reference table and all kind of weird bugs can now happen.
For instance, if you now go to the page module and try to translate all content element to "German" with the Translate button, the wizard will crash with an error 500 and the exception message:
"Child record was not processed". The tt_content textmedia element will not be translated, but the original tt_content (sys_language_uid) now has 3 file references instead of 1.
Files
Updated by Christian Eßl almost 5 years ago
Tested around a bit:
- Problem is reproducible on TYPO3 9.5.13.
- Problem is reproducible on TYPO3 10.3
- When copying a translated tt_content record to another page, the copied record will not be shown in the list module. (As it has a non-available l10n_parent)
- However it will be shown in the page module and is editable. When you change the sys_language_uid to another one, the sys_language_uid of its inline relations (sys_file_reference in this example) will not be updated.
- installed ext:news
- created a news record on page A, translated the news record to "german"
- Copied the german translation of the news record.
- Inserted the copied record on page B
The copied translation record will not be shown in the list module, as with the tt_content record. However it is still in the db.
Two questions arise:- Should it even be allowed to copy record translations that have an l10n_parent?
- Should the inline relations of a record be translated as well, when its sys_language_uid is changed?
Updated by Riccardo De Contardi about 4 years ago
- File Schermata 2020-08-30 alle 11.49.34.png Schermata 2020-08-30 alle 11.49.34.png added
- File Schermata 2020-08-30 alle 11.48.46.png Schermata 2020-08-30 alle 11.48.46.png added
- File Schermata 2020-08-30 alle 11.48.27.png Schermata 2020-08-30 alle 11.48.27.png added
Is the problem still reproducible on 11.0.0-dev? How?
I tried to follow the following steps:
1) Multilanguage TYPO3 with 2 languages:
- Italian (Default)
- English (ID=1)
2) Create a page Test89965-A and translate it in english (Test89965-A-ENG)
3) Create a "text and images" CE in Test89965-A (in Italian); add an image and translate it
Important!!: I used the "Connected" (translate) mode
4) Create a page Test89965-B and translate it in english (Test89965-B-ENG)
5) I go to page Test89965-A and try to copy the english version of the content
... and this is where I had a stop: I was not able to find a "copy" icon
- on page module > languages > context menu when clicking on the icon of the translated element
- on page module > columns > english > context menu when clicking on the icon of the element
- on list module
see attached files
Am I missing something?