I want to get rifd of the cHash get parameter when using routing enhancers with custom extension.
The TYPO3 docs/changelog assume that this is possible:
If you really have the requirement to never have a cHash argument, ensure that all placeholders are having strict definitions on what could be the result of the page segment ...
But what exactly does strict definitions mean.
This is my routing configuration:
routeEnhancers:
ExecutiveSearchResultList:
type: Extbase
extension: executivesearch
plugin: searchresultlist
routes:
- { routePath: '/list/{page}', _controller: 'Search::searchResultList', _arguments: {'page': 'page'} }
defaultController: 'Search::searchResultList'
defaults:
page: '1'
action: 'searchResultList'
controller: 'Search'
requirements:
page: '\d+'
the result is
/path/to/my-page/list/1?cHash=6cd242916809d29b799debe824b37fcd
I also have a routing for tx_news that works fine do not append a cHash:
NewsPlugin:
type: Extbase
extension: news
plugin: Pi1
routes:
- { routePath: '/list/{page}', _controller: 'News::list', _arguments: {'page': '@widget_0/currentPage'} }
- { routePath: '/tag/{tag_name}', _controller: 'News::list', _arguments: {'tag_name': 'overwriteDemand/tags'}}
- { routePath: '/news/{news_title}', _controller: 'News::detail', _arguments: {'news_title': 'news'} }
- { routePath: '/archive/{year}/{month}', _controller: 'News::archive' }
defaultController: 'News::list'
aspects:
news_title:
type: PersistedAliasMapper
tableName: 'tx_news_domain_model_news'
routeFieldName: 'path_segment'
defaults:
page: '0'
requirements:
page: '\d+'