Project

General

Profile

Actions

Bug #64399

closed

$GLOBALS['TSFE']->sys_language_uid is not set

Added by Andre Michels over 9 years ago. Updated over 9 years ago.

Status:
Rejected
Priority:
Should have
Assignee:
-
Category:
-
Target version:
-
Start date:
2015-01-21
Due date:
% Done:

0%

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

Description

I found a bug in the language module...

My ts config:

config {
    no_cache = 1
    linkVars := addToList(L)
    sys_language_uid = 2
    language = en
    locale_all = en_US
    htmlTag_langKey = en-US
}

[globalVar = GP:L = 1] 
config.sys_language_uid = 1
....
*some language options ...*

Note that my default sys_language_id is not 0.
Now i go an a page without the L parameter set. In an extbase plugin on this page i want to use this value. So i except $GLOBALS['TSFE']->sys_language_uid to be 2 right? Its 0... If i call the page with the L parameter all things were working.

My workaround is to use $GLOBALS["TSFE"]->tmpl->setup['config.']['sys_language_uid'] but i wonder if i'm wrong or typo3. Is it not allowed to set an default sys_language other than 0?

Actions #1

Updated by Andre Michels over 9 years ago

The problem is that the page after the creation got the sys_language_id 0 and not my 'default'. I had to create a page_overlay for the sys_language_uid 2. But i think it is not how it should work...

Actions #2

Updated by Mathias Schreiber over 9 years ago

  • Status changed from New to Rejected

Hi Andre,

this is exactly how it needs to work.
Here's why:
The entire frontend needs to know which language it currently runs in.
So if you do not have an overlay TYPO3 has to fall back to the language it can show... being default... 0.

So the value if indeed set, just not to a value you'd expect.
The same applies to localization btw.

Cheers
mathias

Actions

Also available in: Atom PDF