Search code examples
typo3realurllanguage-switching

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?


Solution

  • 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.