I'm simply using the official realurl conf on the tx_news documentation. That caused a duplicate slash in my url. It would look like that:
domain.com/post//post-title
To fix it, I found out that I either have to remove or place the following lines after the tx_newspil[news] inside the fixedPostVars:
Before:
'fixedPostVars' => [
'newsDetailConfiguration' => [
[
'GETvar' => 'tx_news_pi1[action]',
'valueMap' => [
'' => 'detail',
],
'noMatch' => 'bypass'
],
[
'GETvar' => 'tx_news_pi1[controller]',
'valueMap' => [
'' => 'detail',
],
'noMatch' => 'bypass'
],
[
'GETvar' => 'tx_news_pi1[news]',
'lookUpTable' => [
'table' => 'tx_news_domain_model_news',
'id_field' => 'uid',
'alias_field' => 'IF(path_segment!="",path_segment,title)',
'addWhereClause' => ' AND NOT deleted',
'useUniqueCache' => 1,
'languageGetVar' => 'L',
'languageExceptionUids' => '',
'languageField' => 'sys_language_uid',
'transOrigPointerField' => 'l10n_parent',
'expireDays' => 180,
'enable404forInvalidAlias' => true
]
]
]
]
After:
'fixedPostVars' => [
'newsDetailConfiguration' => [
[
'GETvar' => 'tx_news_pi1[news]',
'lookUpTable' => [
'table' => 'tx_news_domain_model_news',
'id_field' => 'uid',
'alias_field' => 'IF(path_segment!="",path_segment,title)',
'addWhereClause' => ' AND NOT deleted',
'useUniqueCache' => 1,
'languageGetVar' => 'L',
'languageExceptionUids' => '',
'languageField' => 'sys_language_uid',
'transOrigPointerField' => 'l10n_parent',
'expireDays' => 180,
'enable404forInvalidAlias' => true
]
],
[
'GETvar' => 'tx_news_pi1[action]',
'valueMap' => [
'' => 'detail',
],
'noMatch' => 'bypass'
],
[
'GETvar' => 'tx_news_pi1[controller]',
'valueMap' => [
'' => 'detail',
],
'noMatch' => 'bypass'
]
]
]
Either switching them or simply deleting the controller / action parts fixed the duplicate slash. Now I'd like to understand why that is so, since im a PHP beginner I don't really get it.
I appreciate all the help!
** Just tested, only the action part had to be moved or deleted in order to resolve the duplicate slash