[TYPO3-english] realurl instead of cooluri does not work
Bernd Wilke
t3n at pi-phi.de
Wed Mar 30 17:45:40 CEST 2016
I have to upgrade an old 4.5 to 7.6 and so cooluri is not ready for 7.6
I should use realurl.
but all the old urls should stay the same!
but there is a strange configuration where cooluri skipped the last
path-segment of the news-detail page. And I cant get it to work in
realurl. the configuration of pages is a little bit akward:
I use realurl 2.0.10
[2] home
+- [5] Aktuelles (shortcut to 2)
| +- [15] News-detail
| +- [134] current news (shortcut to 5)
| +- [67] Archive
| :
the news are shown on page 2 as list
the detail page is 15.
the former urls for single news were like
/aktuelles/(news-title)-(news-uid)
so the page 5 is just a shortcut I can not implement the detail view on
that page.
as realurl can not skip the last pathsegment I configured some overrides:
5 : Speaking URL path segment: /akt
15 : Speaking URL path segment: /aktuelles
[x] override the whole path
134: Speaking URL path segment: /aktuelles/news
[x] override the whole path
67 : Speaking URL path segment: /aktuelles/archive
[x] override the whole path
now (realurlconf.php at the end) the urls (link to page 15, with
news-uid) are generated like before, but on click the page to display is
detected false:
| Page Not Found
|
| Reason: Segment "energieausweise-im-praxistest-zu-welche-2470" was
| not a keyword for a postVarSet as expected on page with id=5.
why page 5?
page 5 should have the url '/akt' and not '/aktuelles' (but with TYPO3 7
the link is always direkt to page 2 ('/'))
if I rename the page 5 to anything other than 'Aktuelles' the error
message changed even to page id 2
as there were no entries in tx_realurl_pathcache and tx_realurl_urlcache
for page 15 I inserted some by hand, but to no avail.
and the realurlconf.php:
<?php
$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['realurl'] = array(
'DEFAULT' => array(
'init' => array(
'enableCHashCache' => true,
'appendMissingSlash' => 'ifNotFile,redirect',
'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' => '2',
),
'fileName' => array(
'defaultToHTMLsuffixOnPrev' => 0,
'acceptHTMLsuffix' => 1,
'index' => array(
'print' => array(
'keyValues' => array(
'type' => 98,
),
),
),
),
'fixedPostVars' => array(
'newsDetailConfiguration' => array(
array(
'GETvar' => 'tx_news_pi1[action]',
'valueMap' => array(
'detail' => '',
),
'noMatch' => 'bypass'
),
array(
'GETvar' => 'tx_news_pi1[controller]',
'valueMap' => array(
'News' => '',
),
'noMatch' => 'bypass'
),
array(
'GETvar' => 'tx_news_pi1[news]',
'lookUpTable' => array(
'table' => 'tx_news_domain_model_news',
'id_field' => 'uid',
'alias_field' =>
'concat(substr(title,1,40),\'-\',uid)',
'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,
),
),
),
'15' => 'newsDetailConfiguration',
),
),
);
More information about the TYPO3-english
mailing list