[TYPO3-core] RFC #10075: Bug: Rootline cache does not work in multilingual websites

Francois Suter fsuter at cobweb.ch
Wed Jan 7 15:30:14 CET 2009


Hi,

> the fix looks ok, but I am not sure how this bug affects anything. Do
> you have a real live example?

Do you mean a site where you can see the bug? No. I fixed my sites with 
my patch :-)

One sure way to reproduce the bug is to have a multilingual web site 
with RealURL activated. You should observe inconsistent speaking URLs, 
in particular in the language switching menu.

> If I understand it correctly this "cache" is just valid for a single
> request. It would only become buggy if in one request we switch
> $this->sys_language_uid back and forth.

Well, the idea of the rootline cache introduced in TYPO3 4.2 is that it 
is quite expensive to assemble a rootline. So any assembled rootline is 
stored in a member variable of class t3lib_pageSelect with the page id, 
the MP identifier and MP error flag as keys.

The language is clearly missing as a key, as rootlines are expected to 
be language-overlaid.

The bug indeed really appears when you request the rootline of the same 
page several times in the same code run, but with different languages. 
This is the case for example when you are creating a language menu.

This has quite a wide impact with an extension such as RealURL, because 
wrong speaking URLs are stored in the RealURL cache, then reused for 
subpages to those pages, leading to speaking URLs in mixed languages. It 
becomes quite messy after a while...

Cheers

-- 

Francois Suter
Cobweb Development Sarl - http://www.cobweb.ch


More information about the TYPO3-team-core mailing list