Project

General

Profile

Actions

Bug #89965

open

Copied textmedia element with sys_file_reference that has its language changed, makes the Datahandler throw up

Added by Christian Eßl over 4 years ago. Updated over 3 years ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
DataHandler aka TCEmain
Start date:
2019-12-16
Due date:
% Done:

0%

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

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

Actions #1

Updated by Christian Eßl over 4 years ago

  • Description updated (diff)
Actions #2

Updated by Christian Eßl over 4 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.
I tried around if this happens with other types of records:
  • 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:
  1. Should it even be allowed to copy record translations that have an l10n_parent?
  2. Should the inline relations of a record be translated as well, when its sys_language_uid is changed?

Updated by Riccardo De Contardi over 3 years ago

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?

Actions

Also available in: Atom PDF