Actions
Bug #49499
closedTypoScriptFrontendController->initLLvars issue
Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Localization
Target version:
-
Start date:
2013-06-28
Due date:
% Done:
100%
Estimated time:
TYPO3 Version:
6.0
PHP Version:
5.3
Tags:
Complexity:
easy
Is Regression:
Sprint Focus:
Description
(Every method I'll speak about are in TypoScriptFrontendController class)
Currently, >initLLvars is called from >getConfigArray, which is called from index_ts.php a few lines before ->settingLanguage.
Because of that and the fact that >initLLvars does not reinit ->languageDependencies before filling it can cause some issue, especially if english is not the default sys_language, when one uses >settingLanguage hooks to init language (instead of typoscript conditions)
- My website is French / English, and i'll visit the English version
- initLLVars fills ->languageDependencies with 'fr'
- ->settingLanguage hook properly sets the current language
- as it have to, the hook calls
>initLLVarsagain. Which does not empty >languageDependencies before adding nothing to it.
So, in this case, I end up with a ->languageDependencies = array('fr'), which results into french labels on my english website version.
Solutions are :- Move
>initLLVarscall somewhere in >settingLanguage (where it should belong, IMO). Problem here is that maybe>convPOSTCharsetwill have to be moved after the language init (it depends on >initLLvars because of charsets) so it could be difficult to test. - add "$this->languageDependencies = array()" at the beginning of ->initLLVars in order to ... init ll vars (what is what we should expect from it, no ?)
Actions