简体   繁体   中英

Additional language in realurl fails

i would like to add an additional language to start with /pt/ in an existing project. I added the language for Portugal in the backend, it was given uid=14.

I also include this configuration in another extension, it is properly loaded, displayed in the backend "Configuration" module correctly.

$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl']['_DEFAULT']['preVars'][0] = array(
    'GETvar' => 'L',
    'valueMap' => array(
        'de' => 1,
        ...
        'pt' => 14
    ),
    'noMatch' => 'bypass'
);

The url mydoma.in/pt is correctly resolved and has the correct language. But a link with L=14 is not correctly encoded by the link helper to mydoma.in/pt. Means this fluid template gives me a link with href="/"

<f:link.page additionalParams="{L:14}" addQueryString="true" addQueryStringMethod="POST,GET">portugal</f:link.page>

What can it be?

Do you have set the TypoScript configuration for your new language? Something like:

[globalVar = GP:L=14]
config {
    sys_language_uid = 14
    language = pt
    locale_all = pt
    htmlTag_stdWrap.cObject.20.value = lang="pt"
}
[global]

This could not be solved by configuration. For some reason, L=14 links were once resolved to "/", probably when there was a misconfiguration. This was stored in database table tx_realurl_urldata - and was taken from there regardless what settings I made. Deleting those entries solved the problem. Note: even setting enableUrlEncodeCash = 0 does not prevent realurl (2.1.2) from encoding the link using the mentioned table. It just prevents the extension from storing new urls in that table.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM