Bug #88974
closedWrong l10n_state after copying a record
100%
Description
- Configure tt_content field "assets" with behaviour "allowLanguageSynchronization"
- Create a page with translation
- Create a content element with a media file ("assets") and translate it
- Change the translation behaviour from "Value of default language" to "Custom value" and add a different file
- 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
Updated by Alexander Vogt over 4 years ago
Any news here? This issue still exists with 9.5.18
Updated by Michael Rainer over 3 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.
Updated by Grigori Prokhorov almost 3 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.
Updated by Grigori Prokhorov almost 3 years ago
- Related to Bug #79755: allowLanguageSynchronization triggers exception in translation page modal added
Updated by Grigori Prokhorov almost 3 years ago
- TYPO3 Version changed from 10 to 9
- Is Regression set to Yes
Updated by Jo Hasenau over 1 year ago
- Related to Story #101561: DataHandler related translation issues added
Updated by Gerrit Code Review over 1 year 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
Updated by Gerrit Code Review over 1 year 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
Updated by Gerrit Code Review over 1 year 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
Updated by Benni Mack over 1 year ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset e7fb94bf0aa011b8e02041ec0a63ef8e8cf5b2a2.