Project

General

Profile

Actions

Bug #86797

open

No field value tranformation/URL sanitation when using extbase extension custom field as a route path segment

Added by Michael Hitzler over 5 years ago. Updated over 2 years ago.

Status:
New
Priority:
Should have
Assignee:
-
Category:
Link Handling, Site Handling & Routing
Target version:
-
Start date:
2018-10-30
Due date:
% Done:

0%

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

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}'

Related issues 1 (1 open0 closed)

Related to TYPO3 Core - Bug #86747: Using PersistedPatternMapper has some drawbacksNew2018-10-26

Actions
Actions

Also available in: Atom PDF