[TYPO3-dev] Bug: tslib_pibase::pi_getLL doesn't recognize translation state of pages and/or records

JoH asenau info at cybercraft.de
Tue Apr 20 12:19:24 CEST 2010


>> 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

> 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?

Joey

-- 
Wenn man keine Ahnung hat: Einfach mal Fresse halten!
(If you have no clues: simply shut your gob sometimes!)
Dieter Nuhr, German comedian
Xing: http://contact.cybercraft.de
Twitter: http://twitter.com/bunnyfield
TYPO3 cookbook (2nd edition): http://www.typo3experts.com






More information about the TYPO3-dev mailing list