#111036Backend routes ignore placeholder requirements
Description
Backend routes registered via Configuration/Backend/Routes.php (or
Router::addRoute()) can contain placeholders, e.g. ‘/my-path/{subroute}’.
The Router however creates the Symfony route without any requirements,
so every placeholder falls back to Symfony’s default ‘[^/] ‘.
As a result it is not possible to
- match or generate a backend URL whose placeholder contains a slash,
e.g. ‘/typo3/my-path/some/nested/path’, - restrict a placeholder to a pattern such as ‘\d ‘.
Generating such a URL via UriBuilder fails with:
Parameter "route" for route "custom-route" must match "[^/] "
("some/nested/path" given) to generate a corresponding URL.
Expected: A route option ‘requirements’ is passed on to the Symfony
route, so it is honoured by both the UrlMatcher and the UrlGenerator:
'my_route' => [
'path' => '/my-path/{subroute}',
'target' => MyController::class . '::handleRequest',
'requirements' => [
'subroute' => '.+',
],
],Reviews 2
History 36
-
Benjamin Franzke changed description <span data-processor="relativetime" data-value="2026-10-13T06:50:37+00:00" > 10/13/26, 06:50 </span>
-
Benjamin Franzke changed description <span data-processor="relativetime" data-value="2026-10-13T06:56:26+00:00" > 10/13/26, 06:56 </span>
-
Gerrit Code Review pushed patch set 1 for main to change 96658 status
NewUnder Review <span data-processor="relativetime" data-value="2026-10-13T06:56:55+00:00" > 10/13/26, 06:56 </span> -
Gerrit Code Review pushed patch set 1 for 14.3 to change 96659 <span data-processor="relativetime" data-value="2026-10-13T06:57:14+00:00" > 10/13/26, 06:57 </span>
-
Gerrit Code Review pushed patch set 2 for 14.3 to change 96659 <span data-processor="relativetime" data-value="2026-10-13T07:01:22+00:00" > 10/13/26, 07:01 </span>
-
Benjamin Franzke commented and changed status
Under ReviewResolved done0 %100 % <span data-processor="relativetime" data-value="2026-10-13T07:45:12+00:00" > 10/13/26, 07:45 </span>
Applied in changeset commit:504647f844444c6908427abe93fc1e12619f28eb.