[TYPO3-mvc] Cache/CHash issue with realURL and Multi Language Domains
g4-lisz at tonarchiv.ch
g4-lisz at tonarchiv.ch
Thu Jun 7 16:06:51 CEST 2012
Hi there!
Since we switched our site to language dependent multi domain there's an
issue with our extension...
We are usign 3 languages with 3 domains
L=0 => www.defaultdom.ch
L=1 => www.frenchdom.ch
L=2 => www.italiandom.ch
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.
They both use the same object type in it's action argument:
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',
..............,
),
'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',
),
'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 this links opens in the browser and we switch to another
klinik.uid e.g.
http://www.defaultdom.ch/results/spital/45/
then some content of the page (spitalinfoAction) are still from
tx_hplusinfo_fe_spitalinfo[klinik]=233, others (infoAction) are updated
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...
Before switching to multi language URL
$TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT'] was looking
absolutely the same.
And CHashCache was working properly.
I'm totally screwed - any help will be much appreciated!
Cheers,
T
More information about the TYPO3-project-typo3v4mvc
mailing list