Task #86141

Remove superfluous database contraint in DataMapProcessor

Added by Nicole Cordes over 2 years ago. Updated about 23 hours ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
-
Target version:
-
Start date:
2020-05-18
Due date:
% Done:

100%

Estimated time:
(Total: 0.00 h)
TYPO3 Version:
8
PHP Version:
Tags:
Complexity:
Sprint Focus:

Description

The database query to fetch dependent elements in \TYPO3\CMS\Core\DataHandling\Localization\DataMapProcessor::fetchDependentElements uses an IN constraint as well as an gt() (greater than) constraint. Having the IN constraint is sufficient and the gt() constraint should be superfluous.

Removing the gt() constraint reveals some more flaws as the API returns 0 id as ancestor id. This has to be fixed as well to prevent wrong elements.


Files

issue86141_0.1.0_201809092229.zip (5.44 KB) issue86141_0.1.0_201809092229.zip Nicole Cordes, 2018-09-09 22:30

Subtasks

Bug #91430: Unrelated tt_content associated to a news after translating itClosed2020-05-18

Actions
Bug #94056: Selecting wrong translation while synchronizeInlineRelationsClosedAlexander Opitz2021-05-04

Actions

Related issues

Related to TYPO3 Core - Bug #78059: Checks in DataHandler localize mismatch with new Localization WizardClosedDaniel Maier2016-09-25

Actions
Related to TYPO3 Core - Bug #86231: Distinguish between free-mode localization and chained translationNew2018-09-12

Actions
#1

Updated by Gerrit Code Review over 2 years ago

  • Status changed from New to Under Review

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

#2

Updated by Gerrit Code Review over 2 years ago

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

#3

Updated by Nicole Cordes over 2 years ago

Steps to reproduce the current pending patch and its bugfixes:

- install attached extension "issue86141"
- add a tt_content element in default language as well as a content element for "Related Content" (tab "Extended")
- translate the default record to language_1
- open the new content element of language_1 and remove the attached record in "Related Content", switch from "Value of default language" to "Custom value" and add another new record in that field
- translate the language_1 record to language_2
- add a new "Related Content" element to language_1 record
- translate the language_2 record to language_3

Expected behavior:

- Two new tt_content elements should be created for language_3

Actual behavior:

- An exception ("Child record was not processed", 1486233164) is thrown and prevents the overlay from being removed

#4

Updated by Gerrit Code Review over 2 years ago

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

#5

Updated by Oliver Hader over 2 years ago

The issue is a bit more complex... in the first run I was wondering, why there are localized records that are not having any language parent-relation (l10n_parent).

Since https://review.typo3.org/#/c/50022/ (which allowed chained translations from an existing localized record), l10n_parent is only set for the default language.
In a consequence, records that are only available for a given language and are localized from there into a different language, l10n_parent will stay empty.
The behavior for free-mode localizations (copyToLanguage command in DataHandler) have a similar effect, l10n_parent is set to 0.

Great, in this case we cannot distinguish between connected relations (that were not created from the default language) and free-mode localizations anymore. That's the first issue...

DataMapProcessor can only handle items that are connected (thus, has accordant ancestor relationship - in terms of a chain of translations) - synchronizing values between items, that are not connected to each other, is simply wrong.

Awesome, DataMapProcessor is currently written with the assumption that connected elements always have l10n_parent defined - which is not always the case as written above. That's the second issue...

In order to resolve connected translations chains in a reliable way, the l10n_source values have to be resolved to their relative ancestors. However, since there is no way to distinguish between connected and free-mode localizations that have not been created from some record in default language the information simply is not available.

Great, this issue cannot be solved without enriching the information that is persisted currently. Besides that, l10n_source is not available for all tables. Thus, this is not generic. And that's the third and most severe issue...

Conclusion: Cannot be solved in a generic way with the current information that is available in the database.

#6

Updated by Oliver Hader over 2 years ago

  • Related to Bug #78059: Checks in DataHandler localize mismatch with new Localization Wizard added
#7

Updated by Gerrit Code Review over 2 years ago

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

#8

Updated by Gerrit Code Review over 2 years ago

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

#9

Updated by Tymoteusz Motylewski over 2 years ago

@Olly, you mean that there is no way to detect default language ancestor except for walkin the chain up?
Can you sum up which combinations are/can be supported and which not (in terms of chains of translations)?

#10

Updated by Oliver Hader over 2 years ago

@Tymek I'll do and create a new ticket...

#11

Updated by Oliver Hader over 2 years ago

  • Related to Bug #86231: Distinguish between free-mode localization and chained translation added
#13

Updated by Gerrit Code Review over 2 years ago

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

#14

Updated by Gerrit Code Review over 2 years ago

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

#15

Updated by Gerrit Code Review over 2 years ago

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

#16

Updated by Gerrit Code Review over 2 years ago

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

#17

Updated by Gerrit Code Review over 2 years ago

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

#18

Updated by Gerrit Code Review over 1 year ago

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

#19

Updated by Gerrit Code Review about 1 year ago

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

#20

Updated by Gerrit Code Review 7 days ago

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

#21

Updated by Gerrit Code Review 7 days ago

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

#22

Updated by Gerrit Code Review 7 days ago

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

#23

Updated by Gerrit Code Review 7 days ago

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

#24

Updated by Gerrit Code Review 7 days ago

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

#25

Updated by Gerrit Code Review 7 days ago

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

#26

Updated by Gerrit Code Review 7 days ago

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

#27

Updated by Nicole Cordes 7 days ago

  • Status changed from Under Review to Resolved
#28

Updated by Benni Mack about 23 hours ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF