Bug #63031

Weird Translation behaviour in extbase

Added by Philipp Wrann almost 7 years ago. Updated about 3 years ago.

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

0%

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

Description

I configured

sys_language_mode = content_fallback ; 1,0
sys_language_overlay = hideNonTranslated

and expected extbase to do so - hideNonTranslated

instead i found this assignment in Typo3DbBackend on line 825 (TYPO3-6-2-6)

$overlayMode = $querySettings->getLanguageMode() === 'strict' ? 'hideNonTranslated' : '';

So, sys_language_mode would have to be set to strict to use "hideNonTranslated"

I can't imagine this to be the way it is supposed to be...

By setting $query->getQuerySettings()->setLanguageMode('strict') you can emulate the behaviour without changing global configuration.

Please give me some feedback if this is the way its meant to be, so i can adopt configurations...


Related issues

Related to TYPO3 Core - Bug #72834: sys_language_mode = content_fallback ; 1,0 is not working with ExtbaseClosed2016-01-20

Actions
Related to TYPO3 Core - Bug #82363: Make Extbase translation handling consistent with typoscriptClosedTymoteusz Motylewski2017-09-07

Actions
#1

Updated by Artus Kolanowski over 6 years ago

  • Target version changed from next-patchlevel to 7.3 (Packages)

I have to agree that this seems wrong. In fact the method Typo3QuerySettings::getLanguageOverlayMode() is never used in Extbase. I would assume that instead of:

$overlayMode = $querySettings->getLanguageMode() === 'strict' ? 'hideNonTranslated' : '';

This has to be:

$overlayMode = $querySettings->getLanguageOverlayMode() === 'hideNonTranslated' ? 'hideNonTranslated' : '';

The documentation says:

sys_language_mode
[...] strict: The system will report an error if the requested translation does not exist. [...]

sys_language_overlay
[...] hideNonTranslated: If this keyword is used a record that has no translation will not be shown. The default is that records with no translation will show up in the default language. [...]

I would make a push if anybody could confirm that this is currently wrong implemented!

#2

Updated by Benni Mack over 6 years ago

  • Target version changed from 7.3 (Packages) to 7.4 (Backend)
#3

Updated by Susanne Moog about 6 years ago

  • Target version changed from 7.4 (Backend) to 7.5
#4

Updated by Benni Mack about 6 years ago

  • Target version deleted (7.5)
#5

Updated by Tobias H. over 5 years ago

Any news on this one?

#6

Updated by Markus Klein about 5 years ago

  • Description updated (diff)
#7

Updated by Tymoteusz Motylewski about 4 years ago

  • Category changed from Extbase to Extbase + l10n
#8

Updated by Riccardo De Contardi about 4 years ago

the line

$overlayMode = $querySettings->getLanguageMode() === 'strict' ? 'hideNonTranslated' : '';

is still present on latest master (see typo3/sysext/extbase/Classes/Persistence/Generic/Storage/Typo3DbBackend.php)

#9

Updated by Tymoteusz Motylewski about 3 years ago

  • Status changed from New to Closed

Well, yes, the naming of the settings is inconsistent with TS.
I'm trying to fix that here: https://review.typo3.org/#/c/53974/
So I'm closing this issue as a duplicate.

#10

Updated by Tymoteusz Motylewski about 3 years ago

  • Related to Bug #82363: Make Extbase translation handling consistent with typoscript added

Also available in: Atom PDF