Actions
Feature #90814
closedAllow slash in routeFieldResult and routeFieldPattern to allow optional paths
Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Site Handling, Site Sets & Routing
Target version:
-
Start date:
2020-03-23
Due date:
% Done:
0%
Estimated time:
PHP Version:
7.3
Tags:
routing, url, aspects
Complexity:
Sprint Focus:
Description
Trying to use a slash in routeFieldPattern and routeFieldResult results in a fatal error.
There seems to be no valid regex pattern possible to achieve a routeFieldResult containing a slash.
The goal is to not have the category path in the URL when the category parameter is not provided.
Expecting URLs like:
Both parameter set: /producer/producer-naame/category/category-name
Only producer parameter set: /producer/producer-naame
Only category parameter set: /category/category-name
SomePlugin: type: Plugin limitToPages: [95] routePath: "/{producer}{category}" namespace: "tx_myext_pi1" requirements: producer: "[0-9]" category: "[0-9]" aspects: producer: type: PersistedPatternMapper tableName: "tx_myext_producers" routeFieldPattern: "producer/^(?P<slug>.+)$" routeFieldResult: "producer/{slug}" category: type: PersistedPatternMapper tableName: "tx_myext_cats" routeFieldPattern: "category/^(?P<slug>.+)$" routeFieldResult: "category/{slug}"
Not sure if this is a bug or a missing feature.
Updated by Patrick Crausaz over 4 years ago
- Related to Bug #88291: Exception thrown if slash in route field of PersistedPatternMapper aspect added
Updated by Patrick Crausaz over 4 years ago
- Category set to Site Handling, Site Sets & Routing
This issue may be solved with Bug #88291 in version 9.5.15
Updated by Patrick Crausaz over 4 years ago
The patch of Bug #88291 solves this issue for me.
Can be closed
Actions