Bug #63694
closedextbase: strict mode and bug with queries in regards addSysLanguageStatement - e.g. contains ignores different MM translations
0%
Description
If one uses addSysLanguageStatement with strict mode the generated statement is incorrect.
The reason is that if I use not strict, the translated record is selected if one exist.
If I use strict I only seem to select the translated record IF there is not parent record to it, otherwise I select the parent record If there is a corresponding translations.
This means that for instance if I use a query with "contains" that has different relations in the child record, it still uses the translations of the parent record.
This might also be the case for different translations.
Updated by Christian Kuhn almost 10 years ago
Hey Andreas. SQL strict mode is currently not supported at all, enabling this (or not disabling on mysql with younger versions) fails at tons of places in the core afaik.
Updated by Andreas Kießling almost 10 years ago
I don't think Andreas is talking about SQL strict mode, but rather config.sys_language_mode.
Extbase and multilanguage is tricky since there are so many config options to consider. I always try to avoid having different relations in translated records. You might want to have a look at "$query->getQuerySettings()->setLanguageMode(..)" to change the language mode on specific queries
Updated by Andreas Allacher almost 10 years ago
Yes. I mean config.sys_language_mode
And this ticket is actually for the new "LanguageMode" setting in extbase. If that is set to "strict".
There is the issue with how the records are retrieved.
I only retrieve the translated records if there is no parent record, otherwise extbase gets the parent record and translates that one.
Which, of course, kind of invalidates the usage of strict. After all this might "destroy" ordering and as mentioned it uses the translations in the MM table of the language parent.
Sorry for the delay. Forgot to mark the issue as "Watch" and therefore got no notification.
Updated by Gerrit Code Review almost 10 years ago
- Status changed from New to Under Review
Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/37039
Updated by Gerrit Code Review almost 10 years ago
Patch set 2 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/37039
Updated by Gerrit Code Review over 9 years ago
Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/37039
Updated by Gerrit Code Review over 9 years ago
Patch set 4 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/37039
Updated by Gerrit Code Review over 9 years ago
Patch set 5 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/37039
Updated by Andreas Allacher over 9 years ago
This is for instance an issue if you have the following:
$records = [ [ 'uid' => 1, 'title' => 'a', 'sys_language_uid' => 0 ], [ 'uid' => 2, 'title' => 'b', 'sys_language_uid' => 0 ], [ 'uid' => 3, 'title' => 'b', 'sys_language_uid' => 1, 'l10n_parent' => 1 ], [ 'uid' => 4, 'title' => 'a', 'sys_language_uid' => 1. 'l10n_parent' => 2 ], ]
Now if I search for records in sys_language_uid = 1 and order by title, I will get
the records with UID 3 and then 4, whereas one would expect 4 and then 3.
Updated by Gerrit Code Review over 9 years ago
Patch set 6 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/37039
Updated by Gerrit Code Review over 9 years ago
Patch set 7 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at http://review.typo3.org/37039
Updated by Gerrit Code Review almost 9 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/37039
Updated by Tymoteusz Motylewski about 8 years ago
- Category changed from Extbase to Linkvalidator
- Target version set to 8 LTS
Updated by Gerrit Code Review over 7 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/37039
Updated by Benni Mack over 7 years ago
- Target version changed from 8 LTS to next-patchlevel
Updated by Tymoteusz Motylewski over 7 years ago
- Category changed from Linkvalidator to Extbase + l10n
Updated by Markus Klein almost 7 years ago
- Related to Bug #77298: Wrong language overlay logic in extbase added
Updated by Tymoteusz Motylewski about 6 years ago
Hi,
Please take a look at this patch https://review.typo3.org/#/c/53974/
It should contain tests (and fixes) covering your issue.
Updated by Susanne Moog almost 6 years ago
- Status changed from Under Review to Closed
Review abandoned, issue fixed with #82363