Project

General

Profile

Actions

Bug #87730

closed

Route Enhancers/Aspects: StaticRangeMappers make PersistedAliasMapper be ignored

Added by Hagen Gebauer about 5 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Must have
Assignee:
-
Category:
Link Handling, Site Handling & Routing
Target version:
-
Start date:
2019-02-18
Due date:
% Done:

100%

Estimated time:
TYPO3 Version:
9
PHP Version:
7.2
Tags:
Complexity:
Is Regression:
Sprint Focus:
On Location Sprint

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


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #90123: Avoid applying zero prefix for zero in StaticRangeMapperClosed2020-01-15

Actions
Actions

Also available in: Atom PDF