Project

General

Profile

Actions

Bug #88974

closed

Wrong l10n_state after copying a record

Added by Alexander Vogt over 4 years ago. Updated 8 months ago.

Status:
Resolved
Priority:
Should have
Assignee:
-
Category:
Localization
Target version:
-
Start date:
2019-08-19
Due date:
% Done:

100%

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

Description

Prerequisites
  1. Configure tt_content field "assets" with behaviour "allowLanguageSynchronization"
Steps to reproduce:
  1. Create a page with translation
  2. Create a content element with a media file ("assets") and translate it
  3. Change the translation behaviour from "Value of default language" to "Custom value" and add a different file
  4. Create a copy of the element

Result:
The copied translation has no image because the l10n_state value of "assets" was set from "custom" to "source" (see attachment).

The wrong state was set in DataMapItem: https://github.com/TYPO3/TYPO3.CMS/blob/9.5/typo3/sysext/core/Classes/DataHandling/Localization/DataMapItem.php#L443


Files

elementcopy.PNG (73.7 KB) elementcopy.PNG Alexander Vogt, 2019-08-19 09:50
assets-of-translation.PNG (15.4 KB) assets-of-translation.PNG Alexander Vogt, 2019-08-19 09:51

Related issues 2 (1 open1 closed)

Related to TYPO3 Core - Bug #79755: allowLanguageSynchronization triggers exception in translation page modalClosedOliver Hader2017-02-11

Actions
Related to TYPO3 Core - Story #101561: DataHandler related translation issuesNew2023-08-03

Actions
Actions #1

Updated by Alexander Vogt almost 4 years ago

Any news here? This issue still exists with 9.5.18

Actions #2

Updated by Michael Rainer over 2 years ago

  • TYPO3 Version changed from 9 to 10

It's also reproducable in v10 (connected mode, copied records).

I think the main bug happens in the getType function:
On copied records, the l10n_overlay records first get a translationSource value of '0'.
(https://github.com/TYPO3/typo3/blob/9.5/typo3/sysext/core/Classes/DataHandling/DataHandler.php#L3757 )
And afterwards the getType function of DataMapItem decides for the copied l10n_overlay records, that they are
in a "TYPE_GRAND_CHILD" relation.
(https://github.com/TYPO3/typo3/blob/9.5/typo3/sysext/core/Classes/DataHandling/Localization/DataMapItem.php#L246 )
And therefore, the overlay states of the copied overlay records are updated to state "source", instead of keeping the state "custom".
(https://github.com/TYPO3/typo3/blob/9.5/typo3/sysext/core/Classes/DataHandling/Localization/DataMapItem.php#L443)

For me the problem seems to be, that the "Overlay States behaviour" is mainly planned in terms of translation handling ( connected and free mode) and is therefore missing the copied behaviour.

Actions #3

Updated by Grigori Prokhorov about 2 years ago

I can confirm that this issue also exists in TYPO3 9.5.30 for the exact same reasons Michael laid out.

Why is the state of these items changed from "custom" to "source"?
This doesn't seem to be sensible or useful.
When does this change make sense?

As per git blame, the change in question has been introduced with the resolution of #79755.

Actions #4

Updated by Grigori Prokhorov about 2 years ago

  • Related to Bug #79755: allowLanguageSynchronization triggers exception in translation page modal added
Actions #5

Updated by Grigori Prokhorov about 2 years ago

  • TYPO3 Version changed from 10 to 9
  • Is Regression set to Yes
Actions #6

Updated by Jo Hasenau 8 months ago

  • Related to Story #101561: DataHandler related translation issues added
Actions #7

Updated by Gerrit Code Review 8 months ago

  • Status changed from New to Under Review

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/+/80518

Actions #8

Updated by Gerrit Code Review 8 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/+/80518

Actions #9

Updated by Gerrit Code Review 8 months ago

Patch set 1 for branch 12.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/+/80572

Actions #10

Updated by Benni Mack 8 months ago

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

Also available in: Atom PDF