#90814Allow slash in routeFieldResult and routeFieldPattern to allow optional paths
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.
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.