Bug #87730
closedRoute Enhancers/Aspects: StaticRangeMappers make PersistedAliasMapper be ignored
100%
Description
I have a route enhancer setting for two extensions that need both date (yyyy/mm/dd) and a title based path_segment in the URL, one of them being tx_news:
requirements:
year: '^20[0-9]{2}$'
month: '^[01][0-9]$'
day: '^[0-3][0-9]$'
aspects:
year:
type: StaticRangeMapper
start: '2016'
end: '2030'
month:
type: StaticRangeMapper
start: '01'
end: '12'
day:
type: StaticRangeMapper
start: '01'
end: '31'
news:
type: PersistedAliasMapper
tableName: 'tx_news_domain_model_news'
routeFieldName: 'path_segment'
The requirements alone – without the StaticRangeMappers – do not make the cHash in the link disappear (although according to the description only loose requirements should do so – I do not consider those requirements regex loose). However, adding the StaticRangeMappers for year/month/day does remove the cHash (and the requirements aren’t needed anymore) but the PersistedAliasMapper will then be ignored and the record UID will be attached to the URL instead. Calling that link will result in a 404.
Additionally I sometimes got the following TYPO3 exception: (1/1) #1537696772 OverflowException: Possible range of all mappers is larger than 10000 items. – which seems a bit odd considering the given range.
There is a stackoverflow thread on that, too:
https://stackoverflow.com/questions/54669488/typo3-9-add-date-to-url-routing-enhancers-for-news-extension