Task #86141
closedRemove superfluous database contraint in DataMapProcessor
Added by Nicole Cordes over 5 years ago. Updated about 3 years ago.
100%
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 |
Updated by Gerrit Code Review over 5 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
Updated by Gerrit Code Review over 5 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
Updated by Nicole Cordes over 5 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
Updated by Gerrit Code Review over 5 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
Updated by Oliver Hader over 5 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 havel10n_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.
Updated by Oliver Hader over 5 years ago
- Related to Bug #78059: Checks in DataHandler localize mismatch with new Localization Wizard added
Updated by Gerrit Code Review over 5 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
Updated by Gerrit Code Review over 5 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
Updated by Tymoteusz Motylewski over 5 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)?
Updated by Oliver Hader over 5 years ago
@Tymek I'll do and create a new ticket...
Updated by Oliver Hader over 5 years ago
- Related to Bug #86231: Distinguish between free-mode localization and chained translation added
Updated by Oliver Hader over 5 years ago
@Tymek Here we go: https://forge.typo3.org/issues/86231
Updated by Gerrit Code Review over 5 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
Updated by Gerrit Code Review over 5 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
Updated by Gerrit Code Review over 5 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
Updated by Gerrit Code Review over 5 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
Updated by Gerrit Code Review over 5 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
Updated by Gerrit Code Review over 4 years 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
Updated by Gerrit Code Review about 4 years 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
Updated by Gerrit Code Review about 3 years 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
Updated by Gerrit Code Review about 3 years 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
Updated by Gerrit Code Review about 3 years 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
Updated by Gerrit Code Review about 3 years 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
Updated by Gerrit Code Review about 3 years 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
Updated by Gerrit Code Review about 3 years 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
Updated by Gerrit Code Review about 3 years 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
Updated by Nicole Cordes about 3 years ago
- Status changed from Under Review to Resolved
Applied in changeset e5a3bb11ec4ea0efb16fbb735ea0b8a1245b2b35.