0

I added a new website language to a TYPO3 project. The new website language has id=2. But if I call e.g. www.your-domain.com/hr.html I get 404 - page not found (normally the start page in the translated language should appear). Also the menus show the links without /hr/. I can call the pages with http://www.your-domain.com/index.php?L=2. The configuration for Typo3 looks like

config {
    linkVars = L 
    sys_language_mode = content_fallback
    sys_language_overlay = hideNonTranslated
    sys_language_uid = 0
    language = de
    locale_all = de_DE
    htmlTag_langKey = de-DE
}

[globalVar = GP:L=1]
config {
     sys_language_uid = 1
     language = en
     local_all = en_GB
     htmlTag_langKey = en-GB
}
[global]

[globalVar = GP:L=2]
config {
     sys_language_uid = 2
     language = hr
     local_all = hr_HR
     htmlTag_langKey = hr-HR
}
[global] 

The RealURL configuration is

'preVars' => array (
    '0' => array (
        'GETvar' => 'no_cache',
        'valueMap' => array (
            'nc' => '1',
        ),
        'noMatch' => 'bypass'
    ),
    '1' => array (
        'GETvar' => 'L',
        'valueMap' => array (
            'de' => '0',
            'en' => '1',
                'hr' => '2',
        ),
            'valueDefault' => 'de',
        'noMatch' => 'bypass',
    ),
        '2' => array (
        'GETvar' => 'lang',
        'valueMap' => array (
            'de' => '0',
            'en' => '1',
                'hr' => '2',
        ),
            'valueDefault' => 'de',
        'noMatch' => 'bypass',
    ),

For me it looks like that everything should work, but it isn't. I also cleared the RealURL Cache with

    $TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearAllCache_additionalTables']['tx_realurl_urldecodecache'] = 'tx_realurl_urldecodecache'; 
    $TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearAllCache_additionalTables']['tx_realurl_urlencodecache'] = 'tx_realurl_urlencodecache'; 
    $TYPO3_CONF_VARS['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['clearAllCache_additionalTables']['tx_realurl_pathcache'] = 'tx_realurl_pathcache'; 

in the localconf.php and pressing the Clear all caches button. I'm using realurl 1.12.1 and Typo3 4.5.5. I also looked into the htaccess and didn't found anything special. What I'm missing?

Mansfield
  • 14,445
  • 18
  • 76
  • 112
testing
  • 19,681
  • 50
  • 236
  • 417
  • how the menu url`s look when you`re on other language ? When you manuly set L parameter in url. How the menu is generated ? – Fixus Apr 26 '12 at 16:33
  • @Fixus: The menu is generated by a PHP script. I will have again a look in it and tell you the results. If I call `www.your-domain.com/index.php?L=2` some of the URLS are missing the language path (`hr`). If I look on a menu not generated by my PHP script I mostly get `http://www.your-domain.com/index.php?id=67&L=2` (except two entries which miss the `hr`). – testing Apr 27 '12 at 07:01
  • 1
    Why you are using php script to generate menu ? Use typoscript. They you`ll have properly generated urls – Fixus Apr 27 '12 at 07:11
  • Why PHP? Because it's far easier and faster to generate more complex menus. Nevertheless it is not mine. But I have the problem also with typsocript generated menus .. But why gives me the URL `www.your-domain.com/hr.html` 404 page not found? This doesn't have to do with the menu ... `en.html`, `de.html` is working fine ... – testing May 02 '12 at 13:25

1 Answers1

0

On the page urltool was removed but the include of urltoolconf_realurl.php was still there (with the old settings). This include in the localconf.php has overwritten my settings of realurl_conf.php (which included the new language).

But still some menus have index.php?id=69&L=2 in the URL instead of the speaking URL. So they were links to other pages and I had to set the links again and make sure there was a translation available (even in folders ...).

testing
  • 19,681
  • 50
  • 236
  • 417