Hi for my extensions I use RealUrl fixedPostVars for the detail view..
'fixedPostVars' => array(
'article' => array(
array(
'GETvar' => 'tx_bla_news[action]',
'valueMap' => array(
'show' => '',
),
'noMatch' => 'bypass'
),
array(
'GETvar' => 'tx_bla_news[controller]',
'valueMap' => array(
'Article' => '',
),
'noMatch' => 'bypass'
),
array(
'GETvar' => 'tx_bla_news[article]',
'lookUpTable' => array(
'table' => 'tx_bla_domain_model_article',
'id_field' => 'uid',
'alias_field' => 'title',
'addWhereClause' => ' AND NOT deleted',
'useUniqueCache' => 1,
'useUniqueCache_conf' => array(
'strtolower' => 1,
'spaceCharacter' => '-',
),
'languageGetVar' => 'L',
'languageExceptionUids' => '',
'languageField' => 'sys_language_uid',
'transOrigPointerField' => 'l10n_parent',
'autoUpdate' => 1,
'expireDays' => 180,
'enable404forInvalidAlias' => 1,
),
),
),
'85' => 'article',
This generates a nice detail view URL like https://www.bla.com/article/title
Now when the article gets edited this URL does not work anymore on the first hit and we need go to list view to click it from there, before it works again.
I get this behavior on 2 different extensions. The above one is fairly simple.
How can I fix this. RealUrl 2.15
[EDIT 24 jan] ===============
Upon saving a record the corresponding entries for the record in tx_realurl_urldata and tx_realurl_uniqalias get deleted. How to prevent loosing the entries upon save??
The tx_realurl_uniqalias gets an expire timestamp.
If the action part gets changed in
'valueMap' => array(
'show' => 'show',
),
'noMatch' => 'bypass'
Or just in
'valueDefault' => 'show'
It works ok. But then I always get an extra URL part show..
======== Thanks to Franske I got it to work :)
Solution with ts:
[globalVar = GP:tx_bla_news|article > 0]
config.defaultGetVars {
tx_bla_news {
controller = Article
action = show
}
}
[global]