Project

General

Profile

Actions

Bug #63031

closed

Weird Translation behaviour in extbase

Added by Philipp Wrann over 9 years ago. Updated over 5 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 2 (0 open2 closed)

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
Actions #1

Updated by Artus Kolanowski almost 9 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!

Actions #2

Updated by Benni Mack almost 9 years ago

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

Updated by Susanne Moog over 8 years ago

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

Updated by Benni Mack over 8 years ago

  • Target version deleted (7.5)
Actions #5

Updated by Tobias H. about 8 years ago

Any news on this one?

Actions #6

Updated by Markus Klein over 7 years ago

  • Description updated (diff)
Actions #7

Updated by Tymoteusz Motylewski over 6 years ago

  • Category changed from Extbase to Extbase + l10n
Actions #8

Updated by Riccardo De Contardi over 6 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)

Actions #9

Updated by Tymoteusz Motylewski over 5 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.

Actions #10

Updated by Tymoteusz Motylewski over 5 years ago

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

Also available in: Atom PDF