Real URL only shows me index.php?id=xx when changing language

南笙酒味 提交于 2019-12-11 06:16:26

问题


If I look at my default language the links have speaking url (www.yoursite.com/company/about-us.html). But now I added a language and if I look at the links I get

www.yoursite.com/index.php?id=63&L=1

What is wrong? This is my Typoscript for the list menu:

lib.tsfootermenu1 = COA
lib.tsfootermenu1 {

  10 = HTML
  10.value = <p class="ContentOverviewHeading">


  15 < tmp.tsfootermenu1

  20 = HTML
  20.value = </p>

  25 = HMENU
  25  {
    special = directory
    special.value = 63
    entryLevel = 0

    1 = TMENU
    1.wrap = <ul>|</ul>
    1{
        expAll = 0
        NO{
          ATagTitle.field = title
          wrapItemAndSub = <li>|</li>
          ATagParams = class="SubMenu1"
        }
    }
  }
}

The TS reads out all elements in a folder and shows a list. I have added a page translation for the folder and the elements in it, but I still get the index.php?id=xx URL. Of course I cleared the real url and page cache.

Edit:

My realURL config:

$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl'] = array ( 
'_DEFAULT' => array (
    'init' => array (
        'enableCHashCache' => '1',
        'appendMissingSlash' => 'ifNotFile',
        'enableUrlDecodeCache' => '1',
        'enableUrlEncodeCache' => '1',
    ),
    'redirects' => array (
    ),
    'preVars' => array (
        '0' => array (
            'GETvar' => 'no_cache',
            'valueMap' => array (
                'nc' => '1',
            ),
            'noMatch' => 'bypass'
        ),
        '1' => array (
            'GETvar' => 'L',
            'valueMap' => array (
                'de' => '0',
                'en' => '2',
                'valueDefault' => 'de',
            ),
            'noMatch' => 'bypass',
        ),
        '2' => array (
            'GETvar' => 'lang',
            'valueMap' => array (
                'de' => 'de',
                'en' => 'en',
            ),
            'noMatch' => 'bypass',
        ),
    ),
    'pagePath' => array (
        'type' => 'user',
        'userFunc' => 'EXT:realurl/class.tx_realurl_advanced.php:&tx_realurl_advanced->main',
        'spaceCharacter' => '-',
        'languageGetVar' => 'L',
        'expireDays' => '7',
        'rootpage_id' => '1',
    )

Edit:
My solution looked like I changed the complete config to L=2. Typo3 has obviously some problems with a deleted language.


回答1:


At least you did not define an mapping for L=1, only L=0 or L=2 in your Realurl config.



来源:https://stackoverflow.com/questions/8212016/real-url-only-shows-me-index-phpid-xx-when-changing-language

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!