Bug #30778
Exceeding Request arguments should only be appended to URI if configured
100%
Description
Currently when creating URIs/Links via the UriBuilder arguments that are not part of the configured route values are appended to the resulting URI as query string. This makes it difficult to get a reliable behavior.
Example:
Given following Routes.yaml
- uriPattern: 'foo/static' defaults: '@package': 'Acme.Demo' '@controller': 'Standard' '@action': 'index' - uriPattern: 'foo/{dynamic}' defaults: '@package': 'Acme.Demo' '@controller': 'Standard' '@action': 'index'
Now <f:uri.action action="index" arguments="{dynamic: 'bar'}" />
would result in the URI foo/static?dynamic=bar.
This could be solved by moving the second route above the first one, but than the matching wouldn't work as expected because the URI foo/static would match the dynamic route then.
We do need the feature of appended query strings for fallback routes and if you want to explicitly use them.
As a solution I'd suggest to append the exceeding arguments only when configured in the respective route:
- uriPattern: 'foo/{dynamic}' defaults: '@package': 'Acme.Demo' '@controller': 'Standard' '@action': 'index' appendExceedingArguments: true
Related issues
Updated by Mr. Hudson over 9 years ago
- Status changed from New to Under Review
Patch set 1 of change I5fcb3b583cc237957337e1d94731695e51afcc45 has been pushed to the review server.
It is available at http://review.typo3.org/5779
Updated by Mr. Hudson over 9 years ago
Patch set 2 of change I5fcb3b583cc237957337e1d94731695e51afcc45 has been pushed to the review server.
It is available at http://review.typo3.org/5779
Updated by Mr. Hudson over 9 years ago
Patch set 3 of change I5fcb3b583cc237957337e1d94731695e51afcc45 has been pushed to the review server.
It is available at http://review.typo3.org/5779
Updated by Bastian Waidelich over 9 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset d74ce5d9cf5081ebe019c594b80c4d17b96d4fa8.