[TYPO3-english] RealURL issue on TYPO3 6.2.9: language parameter (L=0)

Markus Klein klein.t3 at reelworx.at
Mon Dec 29 23:24:32 CET 2014


Hi Dennis,

this is a configuration we use.

--------------------------------------------------------
<?php

$domainToRootIdMapping = array(
	'www.example.com' => 1,
);

$domainAliases = array(
	'alias.example.com' => 'www.example.com'
);

$languageIdMapping = array(
	'de' => 1,
);

$rssFeedPageType = 9818;

$config = array(
	'init' => array(
		'enableCHashCache' => TRUE,
		'appendMissingSlash' => 'ifNotFile,redirect',
		'adminJumpToBackend' => TRUE,
		'enableUrlDecodeCache' => TRUE,
		'enableUrlEncodeCache' => TRUE,
		'emptyUrlReturnValue' => '/',
	),
	'pagePath' => array(
		'type' => 'user',
		'userFunc' => 'EXT:realurl/class.tx_realurl_advanced.php:&tx_realurl_advanced->main',
		'spaceCharacter' => '-',
		'languageGetVar' => 'L',
		'rootpage_id' => 0, // will be defined per domain
		'expireDays' => 3,
	),
	'fileName' => array(
		'defaultToHTMLsuffixOnPrev' => 0,
		'acceptHTMLsuffix' => 1,
		'index' => array(
			'feed.rss' => array(
				'keyValues' => array(
					'type' => $rssFeedPageType,
				)
			)
		)
	),
	'preVars' => array(
		array(
			'GETvar' => 'no_cache',
			'valueMap' => array(
				'no_cache' => 1
			),
			'noMatch' => 'bypass',
		),
		array(
			'GETvar' => 'L',
			'valueMap' => $languageIdMapping,
			'noMatch' => 'bypass',
		),
	),
	'fixedPostVars' => array(),
	'postVarSets' => array(
		'_DEFAULT' => array(),
	),
);

// Apply config to all domains
foreach($domainToRootIdMapping as $domain => $uid) {
	$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl'][$domain] = $config;
	$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl'][$domain]['pagePath']['rootpage_id'] = $uid;
}

// Apply aliases
foreach($domainAliases as $alias => $domain) {
	$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl'][$alias] = $domain;
}

--------------------------------------------------------


Be aware that in your config file the very last line seems a bit odd to me as "php?>" is not a valid closing tag. This should IMO trigger a PHP warning or error.
The closing tag can be omitted completely in general.

Kind regards
Markus

------------------------------------------------------------
Markus Klein
TYPO3 CMS Active Contributors Team Member

> -----Original Message-----
> From: typo3-english-bounces at lists.typo3.org [mailto:typo3-english-
> bounces at lists.typo3.org] On Behalf Of Dennis Hoffland
> Sent: Monday, December 29, 2014 10:21 PM
> To: typo3-english at lists.typo3.org
> Subject: [TYPO3-english] RealURL issue on TYPO3 6.2.9: language parameter
> (L=0)
> 
> Hello,
> 
> I just upgraded my website to release 6.2.9.
> 
> Unfortunely, RealURL (1.12.8) no longer seems to "translate" the language
> parameter (L=0, L=1, etc.), it seems to be simply ignore them. My previous
> configuration of RealURL, which I used on TYPO3 4.7.20 is enclosed. It
> produced URLs like:
> 
> http://www.mysite.com/en/contact.html
> 
> Now instead I get:
> 
> http://www.mysite.com/contact/?L=0
> 
> Any suggestions are very much appreciated.
> 
> Kind regards,
> 
> Dennis



More information about the TYPO3-english mailing list