#86797No field value tranformation/URL sanitation when using extbase extension custom field as a route path segment
Description
When I try to use a custom field for routing in an extbase extension the field value does not get transformed to a proper URL segment (whitespace replace, special chars / replace / remove, lower case, etc.)
In order to reproduce you can use the tx_news extension and instead of using the slug field we use the title field.
In both cases, with the PersistedAliasMapper or the PersistedPatternMapper, the resulting path segment still contains whitespaces, special chars and uppercase letters which leads to invalid URLs.
aspects:
news_title:
type: PersistedAliasMapper
tableName: 'tx_news_domain_model_news'
routeFieldName: 'path_segment'
or
aspects:
news_title:
type: PersistedPatternMapper
tableName: 'tx_news_domain_model_news'
routeFieldPattern: '^(?P<title>.+)-(?P<uid>\d+)$'
routeFieldResult: '{title}-{uid}'Reviews 1
Fix this issue
Start the commit message of your patch with this. Add what the patch does, and the versions it goes to in "Releases:". The changes above were merged or abandoned: read them before you start. How to create a patch
- Commit message
-
[BUGFIX] No field value tranformation/URL sanitation when using extbase extension custom field as a route path segment Resolves: #86797 Releases: main