[TYPO3-dev] Extbase Cache/CHash(?) issue with realURL and Multi Language Domains

g4-lisz at tonarchiv.ch g4-lisz at tonarchiv.ch
Sat Jun 23 18:00:46 CEST 2012


Hi Tolleiv,

thanks for your hint... but switching to 4.7 is too much hassle at the 
moment. Backporting to 4.6.X seems complicated -  or am i wrong?

Are you sure that this issue is not RealURL related? I wonder because it 
did work before without multilang setup.

Thanks,
Till


On 23.06.2012 13:40, Tolleiv Nietsch wrote:
> Hi,
>
> you might want to checkout out the features introduced with 
> https://review.typo3.org/#/c/4704/
>
> These configurations where made for equal issues (e.g. on typo3.org). 
> Especially with extbase the controller and action might or might not 
> be part of the URL and the resulting cHash should ideally not be 
> affacted by this.
>
> Patch and issue description show the issue very well: 
> http://forge.typo3.org/issues/29365
>
> Hope this helps.
>
> Cheers,
> Tolleiv
>
> g4-lisz at tonarchiv.ch schrieb:
>> Hi there
>>
>> Since we switched our site to language dependent multi domain (one tree
>> concept) there's a cache issue with our extension...
>>
>> Typo 4.6.7 with RealURL 1.12.1 and Extbase 1.4.3
>>
>> We are usign 3 languages with 3 related domains:
>>
>> L=0 => www.defaultdom.ch
>> L=1 => www.frenchdom.ch
>> L=2 => www.italiandom.ch
>>
>> There's some TS trickery to set the right BaseURL/doc title:
>>
>> BASEURL = http://www.defaultdom.ch/
>> PAGETITLE = Sitename Default
>> [globalString = ENV:HTTP_HOST=*frenchdom.ch]
>> BASEURL = http://www.frenchdom.ch/
>> PAGETITLE = Sitename French
>> [globalString = ENV:HTTP_HOST=*italiandom.ch]
>> BASEURL = http://www.italiandom.ch/
>> PAGETITLE = Sitename Italian
>> [global]
>>
>> page {
>> config {
>> # settings for RealURL
>> simulateStaticDocuments = 0
>> baseURL = {$BASEURL}
>> tx_realurl_enable = 1
>> prefixLocalAnchors = all
>> }
>> ...
>> }
>> page.headerData {
>> 348 = COA
>> 348 {
>> wrap = <title>|</title>
>> 10 = TEXT
>> 10.value ={$PAGETITLE}
>> 20 = TEXT
>> 20.value = :&#32;
>> 30 = TEXT
>> 30.data = field:title
>> }
>> }
>>
>>
>> The realurl_conf.php looks like this:
>>
>> <?php
>> $TYPO3_CONF_VARS['EXTCONF']['realurl']['_DOMAINS'] = array(
>> 'encode' => array(
>> array(
>> 'GETvar' => 'L',
>> 'value' => '0',
>> 'useConfiguration' => '_DEFAULT',
>> 'urlPrepend' => 'http://www.defaultdom.ch'
>> ),
>> array(
>> 'GETvar' => 'L',
>> 'value' => '1',
>> 'useConfiguration' => '_DEFAULT',
>> 'urlPrepend' => 'http://www.frenchdom.ch'
>> ),
>> array(
>> 'GETvar' => 'L',
>> 'value' => '2',
>> 'useConfiguration' => '_DEFAULT',
>> 'urlPrepend' => 'http://www.italiandom.ch'
>> ),
>> ),
>> 'decode' => array(
>> '/^(www\.)?defaultdom\.ch$/' => array(
>> 'GETvars' => array(
>> 'L' => '0',
>> ),
>> 'useConfiguration' => '_DEFAULT'
>> ),
>> '/^(www\.)?frenchdom\.ch$/' => array(
>> 'GETvars' => array(
>> 'L' => '1',
>> ),
>> 'useConfiguration' => '_DEFAULT'
>> ),
>> '/^(www\.)?italiandom\.ch$/' => array(
>> 'GETvars' => array(
>> 'L' => '2',
>> ),
>> 'useConfiguration' => '_DEFAULT'
>> ),
>> ),
>> );
>>
>> On one page we embedded a pluign twice with different Controller/Action.
>> These plugin Controller/Actions are set by FlexFrom configuration. The
>> related action controller functions both use the same object type in
>> it's argument list:
>>
>> public function spitalinfoAction(Tx_Hplusinfo_Domain_Model_Klinik
>> $klinik) { ... }
>> and
>> public function infoAction(Tx_Hplusinfo_Domain_Model_Klinik $klinik) {
>> ... }
>>
>> The realURL mapping looks like this:
>> $TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT'] = array(
>> 'init' => array(
>> 'enableCHashCache' => '1',
>> 'appendMissingSlash' => 'ifNotFile,redirect',
>> 'adminJumpToBackend' => '1',
>> 'enableUrlDecodeCache' => '1',
>> 'enableUrlEncodeCache' => '1',
>> 'emptyUrlReturnValue' => '/',
>> 'respectSimulateStaticURLs' => '1',
>> 'disableErrorLog' => '1',
>> ),
>> 'pagePath' => array(
>> 'type' => 'user',
>> 'userFunc' =>
>> 'EXT:realurl/class.tx_realurl_advanced.php:&tx_realurl_advanced->main',
>> 'spaceCharacter' => '-',
>> 'segTitleFieldList' => 'tx_realurl_pathsegment,title',
>> 'languageGetVar' => 'L',
>> 'rootpage_id' => '1',
>> ),
>> 'fileName' => array(
>> 'defaultToHTMLsuffixOnPrev' => '0',
>> 'acceptHTMLsuffix' => '1',
>> 'index' => array(
>> 'print' => array(
>> 'keyValues' => array(
>> 'type' => '98',
>> ),
>> ),
>> 'bericht.pdf' => array(
>> 'keyValues' => array(
>> 'type' => '1315357927',
>> ),
>> ),
>> ),
>> ),
>> 'preVars' => array(
>> '0' => array(
>> 'GETvar' => 'L',
>> 'valueMap' => array(
>> 'it' => '2',
>> 'fr' => '1',
>> ),
>> 'noMatch' => 'bypass',
>> ),
>> ),
>> 'postVarSets' => array(
>> '_DEFAULT' => array(
>> 'spital' => array(
>> 0 => array(
>> 'GETvar' => 'tx_hplusinfo_fe_spitalinfo[klinik]',
>> ),
>> ),
>> 'action' => array(
>> 0 => array(
>> 'GETvar' => 'tx_hplusinfo_fe_spitalinfo[controller]',
>> 'noMatch' => 'bypass',
>> ),
>> 1 => array(
>> 'GETvar' => 'tx_hplusinfo_fe_spitalinfo[action]',
>> 'noMatch' => 'bypass',
>> ),
>> ),
>> ),
>> ),
>> ),
>> );
>>
>>
>> With this a URL looks like http://www.defaultdom.ch/results/spital/233/
>> (<- tx_hplusinfo_fe_spitalinfo[klinik]=233)
>>
>> Now when we open this link in a browser for the first time (cache
>> cleared) everything seams right. But after chaning the objects uid, e.g.
>> http://www.defaultdom.ch/results/spital/45/
>> some content of the page (spitalinfoAction) is still the cached version
>> from tx_hplusinfo_fe_spitalinfo[klinik]=233, other parts (infoAction)
>> are updated correctly to tx_hplusinfo_fe_spitalinfo[klinik]=45
>>
>> When i set 'enableCHashCache' = 0 then it works as long as the CHash is
>> appended to the URL... Without CHash i get the last cached version for
>> the spitalinfoAction view parts of the page.
>>
>> Before switching to multi language URL
>> $TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT'] was looking
>> absolutely the same.
>> And my extension was working properly with CHashCache.
>> $TYPO3_CONF_VARS['EXTCONF']['realurl'] = array(
>> '_DEFAULT' => array(
>> 'init' => array(
>> 'enableCHashCache' => '1',
>> 'appendMissingSlash' => 'ifNotFile,redirect',
>> 'adminJumpToBackend' => '1',
>> 'enableUrlDecodeCache' => '1',
>> 'enableUrlEncodeCache' => '1',
>> 'emptyUrlReturnValue' => '/',
>> 'respectSimulateStaticURLs' => '1',
>> 'disableErrorLog' => '1',
>> ),
>> 'pagePath' => array(
>> 'type' => 'user',
>> 'userFunc' =>
>> 'EXT:realurl/class.tx_realurl_advanced.php:&tx_realurl_advanced->main',
>> 'spaceCharacter' => '-',
>> 'segTitleFieldList' => 'tx_realurl_pathsegment,title',
>> 'languageGetVar' => 'L',
>> 'rootpage_id' => '1',
>> ),
>> 'fileName' => array(
>> 'defaultToHTMLsuffixOnPrev' => '0',
>> 'acceptHTMLsuffix' => '1',
>> 'index' => array(
>> 'print' => array(
>> 'keyValues' => array(
>> 'type' => '98',
>> ),
>> ),
>> 'bericht.pdf' => array(
>> 'keyValues' => array(
>> 'type' => '1315357927',
>> ),
>> ),
>> ),
>> ),
>> 'preVars' => array(
>> '0' => array(
>> 'GETvar' => 'L',
>> 'valueMap' => array(
>> 'it' => '2',
>> 'fr' => '1',
>> ),
>> 'noMatch' => 'bypass',
>> ),
>> ),
>> 'postVarSets' => array(
>> '_DEFAULT' => array(
>> 'spital' => array(
>> 0 => array(
>> 'GETvar' => 'tx_hplusinfo_fe_spitalinfo[klinik]',
>> ),
>> ),
>> 'action' => array(
>> 0 => array(
>> 'GETvar' => 'tx_hplusinfo_fe_spitalinfo[controller]',
>> 'noMatch' => 'bypass',
>> ),
>> 1 => array(
>> 'GETvar' => 'tx_hplusinfo_fe_spitalinfo[action]',
>> 'noMatch' => 'bypass',
>> ),
>> ),
>> ),
>> ),
>> ),
>> );
>>
>>
>>
>> I'm totally screwed - any help would be much appreciated!
>>
>> Cheers,
>> T
>




More information about the TYPO3-dev mailing list