2012-06-05 17 views
1

我正在運行Typo3 4.5.12和realurl擴展版本1.11.1。 我的網站有3種語言de,en,ch,默認語言是de,德語。Typo3 realurl在clearCache之後的鏈接中有錯誤的defaultValue

如果我清除realurl的緩存並首先調用www.example.com/site,則一切正常。

但是,如果我先調用clearCache之後調用一個像www.example.com/en/site這樣的語言參數的URL,然後在www.example.com/site之後,所有鏈接都會獲得../en/。 。在像www.example.com/en/site2這樣的href標籤中。

It's一樣時,我先打電話clearCache後../ch/網站..或者../de/ ..

他爲什麼鴕鳥政策接我的時候調用默認的語言www.example.com/site鏈接?

我realurl的配置:

$TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT'] = array(
    init' => array(
     'enableCHashCache' => 1, 
     'appendMissingSlash' => 'ifNotFile', 
     'enableUrlDecodeCache' => 1, 
     'enableUrlEncodeCache' => 1, 
     'respectSimulateStaticURLs' => 0, 
    ), 
    'redirects_regex' => array (
    ), 
    'preVars' => array(
     array(
      'GETvar' => 'no_cache', 
      'valueMap' => array('no_cache' => 1), 
      'noMatch' => 'bypass', 
     ), 
     array(
      'GETvar' => 'L', 
      'valueMap' => array(
       'de' => '0', 
       'en' => '1', 
       'cn' => '2', 
      ), 
      'defaultValue' => 'de', 
      'noMatch' => 'bypass', 
     ), 
    ), 
... 

我的頁面配置:

simulateStaticDocuments = 0 
tx_realurl_enable = 1 
prefixLocalAnchors = all 

linkVars = mobile(off),L 
uniqueLinkVars = 1 

sys_language_uid = 0 
language = de 
locale_all = de_DE.UTF-8 

sys_language_mode = content_fallback 
sys_language_overlay = 1 

回答

1
[...] 
'defaultValue' => 'de', 
'noMatch' => 'bypass', 
[...] 

有些禁忌的字典。

就拿noMatch出來,這將創建的URL,如:

/site1 (german) 
/en/site1 (english) 
/cn/site1 (chinese) 

否則去

'noMatch' => 'de' //(without `'defaultValue' => 'de'`) 

得到

/de/site1 (german) 
/en/site1 (english) 
/cn/site1 (chinese) 
+0

@konsolenfreddy嗨 - 我有一個類似的/與當前realURL相同的問題,但是您的解決方案'nomatch'=>'de'將不起作用。你還建議get/de/site1,/ en/site1等嗎? – Urs

+0

這裏似乎有些東西混雜在一起,第一個設置爲secont例子創建了結果,參見參考資料。 http://stackoverflow.com/questions/17109737/realurl-not-writing-prevar-for-default-language/ – Urs