[TYPO3-dev] Bug: tslib_pibase::pi_getLL doesn't recognize translation state of pages and/or records
Steffen Kamper
info at sk-typo3.de
Tue Apr 20 12:30:48 CEST 2010
Hi,
JoH asenau schrieb:
>>> While working at a client page, we discovered this one:
>>> http://bugs.typo3.org/view.php?id=14159
>>>
>>> Any ideas, how to solve this without breaking backwards
>>> compatibility?
>> i'm always not sure when using fallback, is it updated in
>> sys_language_uid? So the question is where to get a reliable
>> information of the shown language.
>
> The only reliable source for the language currently used on a page is
> $GLOBALS['TSFE']->sys_language_uid, which is why we discovered the bug,
> since parts of the plugin were translated by our own functions using
> sys_language_uid, while the rest used pi_getLL
>
it seems to be different. All settings are done in $TSFE->settingLanguage();
and if you look into the reliable part should be $TSFE->sys_language_content
sys_language_uid always hold the var set in config (from my quick view)
>> And next problem, it could be on element level instead page level.
>
> In this case it should be possible to check for the sys_language_uid of the
> record currently loaded in $this->cObj->data, since the fallback record
> should have a different one than the translated one.
>
> Or did I miss something here?
>
that should be correct as the data is fetched with overlay method, and
TSFE sets language in sys_page, see above.
vg Steffen
More information about the TYPO3-dev
mailing list