Project

General

Profile

Actions

Bug #63694

closed

extbase: strict mode and bug with queries in regards addSysLanguageStatement - e.g. contains ignores different MM translations

Added by Andreas Allacher almost 10 years ago. Updated over 5 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Extbase + l10n
Target version:
Start date:
2014-12-09
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
6.2
PHP Version:
Tags:
Complexity:
Is Regression:
No
Sprint Focus:

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.


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #77298: Wrong language overlay logic in extbaseClosed2016-07-29

Actions
Actions #1

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.

Actions #2

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

Actions #3

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.

Actions #4

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

Actions #5

Updated by Gerrit Code Review over 9 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

Actions #6

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

Actions #7

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

Actions #8

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

Actions #9

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.

Actions #10

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

Actions #11

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

Actions #12

Updated by Gerrit Code Review over 8 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

Actions #13

Updated by Tymoteusz Motylewski about 8 years ago

  • Category changed from Extbase to Linkvalidator
  • Target version set to 8 LTS
Actions #14

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

Actions #15

Updated by Benni Mack over 7 years ago

  • Target version changed from 8 LTS to next-patchlevel
Actions #16

Updated by Tymoteusz Motylewski about 7 years ago

  • Category changed from Linkvalidator to Extbase + l10n
Actions #17

Updated by Markus Klein over 6 years ago

  • Related to Bug #77298: Wrong language overlay logic in extbase added
Actions #18

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.

Actions #19

Updated by Susanne Moog over 5 years ago

  • Status changed from Under Review to Closed

Review abandoned, issue fixed with #82363

Actions

Also available in: Atom PDF