Project

General

Profile

Actions

Bug #89787

closed

Copying element with IRRE element from one language to another

Added by Chris Müller over 5 years ago. Updated about 2 months ago.

Status:
Resolved
Priority:
Must have
Assignee:
-
Category:
DataHandler aka TCEmain
Target version:
-
Start date:
2019-11-27
Due date:
% Done:

100%

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

Description

When copying an IRRE content element from one language to another (for example with drag and drop, in our case from sys_language_uid 1 to sys_language_uid 0) changes the language for the parent element but not for the child elements.

We use for localisation a single page tree with free mode.


Related issues 6 (2 open4 closed)

Related to TYPO3 Core - Task #104956: Add test for langugae behaviour of inline children on copyClosed2024-09-13

Actions
Related to TYPO3 Core - Bug #103969: Update language of inline elements is missing, leading to follow up issuesUnder Review2024-06-04

Actions
Related to TYPO3 Core - Bug #75400: Related child elements don't get correct sys_language_uid during localization of parent recordClosedJo Hasenau2016-04-04

Actions
Related to TYPO3 Core - Bug #39054: Copied Content Elements incorrectly inherit languageResolved2012-07-18

Actions
Related to TYPO3 Core - Bug #106334: Translations of copied elements end up in default language Resolved2025-03-07

Actions
Related to TYPO3 Core - Bug #106655: pasteDataMap overridden for each command in DataHandler::process_cmdmapUnder Review2025-05-06

Actions
Actions #1

Updated by Chris Müller over 5 years ago

  • Category set to DataHandler aka TCEmain
Actions #2

Updated by Chris Müller over 5 years ago

  • Description updated (diff)
Actions #3

Updated by Susanne Moog over 5 years ago

  • Sprint Focus set to On Location Sprint
Actions #4

Updated by Helmut Hummel about 5 years ago

  • Status changed from New to Accepted
Actions #5

Updated by Oliver Hader over 2 years ago

  • Sprint Focus deleted (On Location Sprint)
Actions #6

Updated by Denis Mir over 1 year ago · Edited

  • Priority changed from Should have to Must have

We experience this bug in 11LTS as well and I don't get why such a bug is a "should have". This is an absolute must have to finally fix the translation related bugs.

Actions #7

Updated by Denis Mir over 1 year ago

  • TYPO3 Version changed from 9 to 11

Found in the current 11LTS release as well.

Actions #8

Updated by Denis Mir 10 months ago

  • TYPO3 Version changed from 11 to 12

Error is still present in 12LTS. Even the `l10n_source` is not set at all.

Actions #9

Updated by Jo Hasenau 10 months ago

Denis Mir wrote in #note-8:

Error is still present in 12LTS. Even the `l10n_source` is not set at all.

That's correct, since you are not actually translating but just copying elements around.
If you want an l10n_source to be present, there has to be a real translation action before.
So you should use the translation modal and the so called "Free Mode" to get elements into another language.

IMHO the actual bug is, that you can copy elements from one language to another.

Actions #10

Updated by Chris Müller 10 months ago · Edited

Problem for us was: We have English as primary language and then German. Nowadays, we write first the German content (and publish it) - then it is translated some weeks later to English (and published). As there is no "Translate back to default language) we have to copy these elements. And for "standard" elements it works (language id is adjusted) - but not for IRRE elements.

Of course, I suggested to our editors, first to set the content element in English (with German texts), if it is done, "translate" to German. Then only the content in English has to translated (but without touching the structure). But editors ...

And: English as default language was a conscious decision we made quite some years ago (which does not work anymore for us). And we need free mode, as on some pages the content structure is different for languages, so we have to go with free mode.

So: copying content elements is a use case. If this is "wrong", then the Core should prevent that (but then we need a translate to the default language). Or if it is possible: it should be fixed somehow.

Actions #11

Updated by Johannes Seipelt 10 months ago · Edited

To add: the fact that the parent element gets the correct language uid set, but not the IRRE childs is wrong in my pov. Which is what was described in this issue in the first place.

Actions #12

Updated by Denis Mir 10 months ago

I agree with what Chris said. And it goes even further. We have free mode in some projects all around since the page content completely differs between the different locales.

And it always happens in these projects that we have e.g. Site A with Page B and Language de_DE and the editor copies one of the elements from this page to Site B, Page D and Language de_AT.

This action is possible currently and should be possible in the future. But it gets the described behavior. Wrong "sys_language_uid" for the IRRE stuff and even the related "sys_file_reference" entries.

So I would definitely say this is a bug and should be fixed. Just removing the feature is not an option.

Actions #13

Updated by Astrid Haubold 9 months ago

  • Related to Task #104956: Add test for langugae behaviour of inline children on copy added
Actions #14

Updated by Gerrit Code Review 8 months ago

  • Status changed from Accepted to Under Review

Patch set 1 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/86773

Actions #15

Updated by Gerrit Code Review 8 months ago

Patch set 2 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/86773

Actions #16

Updated by Gerrit Code Review 8 months ago

Patch set 3 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/86773

Actions #17

Updated by Gerrit Code Review 6 months ago

Patch set 4 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/86773

Actions #18

Updated by Gerrit Code Review 6 months ago

Patch set 5 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/86773

Actions #19

Updated by Gerrit Code Review 6 months ago

Patch set 6 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/86773

Actions #20

Updated by Sybille Peters 6 months ago

I can reproduce this with "Text & Media" and "Media elements" [assets] field (sys_file_reference):

Steps to reproduce:

1. Create a "Text & Media"
2. Add a file in tab "Media" => "Media elements" [assets]
3. create translation for page
4. copy the content element to the translated page

Check in database: both records have sys_language_uid=0

select uid,pid,sys_language_uid,uid_foreign from sys_file_reference where pid=920 and not deleted;
+-----+-----+------------------+-------------+
| uid | pid | sys_language_uid | uid_foreign |
+-----+-----+------------------+-------------+
| 445 | 920 |                0 |         195 |
| 446 | 920 |                0 |         196 |
+-----+-----+------------------+-------------+

Actions #21

Updated by Sybille Peters 6 months ago

  • Related to Bug #103969: Update language of inline elements is missing, leading to follow up issues added
Actions #22

Updated by Gerrit Code Review 5 months ago

Patch set 7 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/86773

Actions #23

Updated by Gerrit Code Review 5 months ago

Patch set 8 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/86773

Actions #24

Updated by Gerrit Code Review 5 months ago

Patch set 9 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/86773

Actions #25

Updated by Gerrit Code Review 5 months ago

Patch set 10 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/86773

Actions #26

Updated by Gerrit Code Review 5 months ago

Patch set 11 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/86773

Actions #27

Updated by Gerrit Code Review 5 months ago

Patch set 12 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/86773

Actions #28

Updated by Christian Kuhn 5 months ago

  • Related to Bug #75400: Related child elements don't get correct sys_language_uid during localization of parent record added
Actions #29

Updated by Gerrit Code Review 5 months ago

Patch set 13 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/86773

Actions #30

Updated by Christian Kuhn 5 months ago

  • Related to Bug #39054: Copied Content Elements incorrectly inherit language added
Actions #31

Updated by Gerrit Code Review 5 months ago

Patch set 14 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/86773

Actions #32

Updated by Gerrit Code Review 5 months ago

Patch set 15 for branch main of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/86773

Actions #33

Updated by Gerrit Code Review 5 months ago

Patch set 1 for branch 13.4 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/87689

Actions #34

Updated by Astrid Haubold 5 months ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #35

Updated by Denis Mir 4 months ago · Edited

Heya guys. One quick question. Was it intended that the bug mentioned in https://forge.typo3.org/issues/89787 was not fixed for 12LTS? We yesterday got the case that these incorrectly set `sys_language_uid` values in the `sys_file_reference` table lead to thousands of deleted `sys_file_reference` entries due to deleting some no longer needed page translation records (that had the same `sys_language_uid`) without the editor even knowing.

This is a real problem for 12LTS. And it is a problem for updated 13LTS installations that still have thousands of incorrectly set `sys_language_uid` values in the `sys_file_reference` table.

Actions #36

Updated by Astrid Haubold 3 months ago

  • Related to Bug #106334: Translations of copied elements end up in default language added
Actions #37

Updated by Benjamin Bomberg 3 months ago

I have a similar problem:
An inline connection between tt_content and a custom DB table.
After creating it in the default language, the inline element remains in the default language when copying the element to another language. However, the content element itself changes to the correct language.
Is there a patch for this in TYPO3 11?

Actions #38

Updated by Christian Kuhn about 2 months ago

Denis Mir wrote in #note-35:

Heya guys. One quick question. Was it intended that the bug mentioned in https://forge.typo3.org/issues/89787 was not fixed for 12LTS?

Hey. Yes: We think the patch was too risky for v12 so we only applied to v13 and main. It indeed had a bug that we have to fix now, see https://review.typo3.org/c/Packages/TYPO3.CMS/+/88827. If you really need that in v12, you'll have to patch the instance yourself.

Actions #39

Updated by Georg Ringer about 2 months ago

  • Related to Bug #106655: pasteDataMap overridden for each command in DataHandler::process_cmdmap added
Actions

Also available in: Atom PDF