Bug #30778

Exceeding Request arguments should only be appended to URI if configured

Added by Bastian Waidelich over 9 years ago. Updated over 9 years ago.

Status:
Resolved
Priority:
Should have
Category:
MVC - Routing
Start date:
2011-10-11
Due date:
% Done:

100%

Estimated time:
PHP Version:
Has patch:
Complexity:

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

Related to TYPO3.Flow - Task #35394: Document Routing feature "appendExceedingArguments"ResolvedKarsten Dambekalns2012-03-30

Actions
#1

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

#2

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

#3

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

#4

Updated by Bastian Waidelich over 9 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
#5

Updated by Karsten Dambekalns over 9 years ago

  • Target version changed from 1230 to 1.0.0

Also available in: Atom PDF