Bug #37445
Router overrides POST arguments
Status: | Resolved | Start date: | 2012-05-23 | |
---|---|---|---|---|
Priority: | Should have | Due date: | ||
Assigned To: | Bastian Waidelich | % Done: | 100% |
|
Category: | MVC - Routing | |||
Target version: | TYPO3 Flow Base Distribution - 1.1 beta 2 | |||
PHP Version: | Complexity: | |||
Has patch: | No | Affected Flow version: | Git master |
Description
I'm not sure whether this is was introduced with #36913, but the POST/PUT arguments are currently not merged with the arguments set from the router but instead Router::route() overrides arguments with the same name.
Related issues
Associated revisions
[BUGFIX] Router overrides request arguments
With the reworked Request stack, the router kicks in after
the action request have been built, overriding all arguments
the respective route specifies.
This works for the most cases, but leads to issues when you
try to specify part of a complex target argument via the route
and part via request.
For example if you update a domain model via request body but
specify the model itself through the URI like
http://domain/products/product-1 - now the Identity-RoutePart
detects "product-1" and turns it into the corresponding
__identity-array but then the Router kicks in and overrides
the "product" argument completely resulting in a new object
to be created by the property mapper.
This change adjusts the Router to recursively merge arguments
with the route values instead, with precedence to the route
values.
Change-Id: I22edc9e871b8b6e5baa731fe30e944f3e5575d05
Fixes: #37445
Releases: 1.1, 1.2
[BUGFIX] Router overrides request arguments
With the reworked Request stack, the router kicks in after
the action request have been built, overriding all arguments
the respective route specifies.
This works for the most cases, but leads to issues when you
try to specify part of a complex target argument via the route
and part via request.
For example if you update a domain model via request body but
specify the model itself through the URI like
http://domain/products/product-1 - now the Identity-RoutePart
detects "product-1" and turns it into the corresponding
__identity-array but then the Router kicks in and overrides
the "product" argument completely resulting in a new object
to be created by the property mapper.
This change adjusts the Router to recursively merge arguments
with the route values instead, with precedence to the route
values.
Change-Id: I22edc9e871b8b6e5baa731fe30e944f3e5575d05
Fixes: #37445
Releases: 1.1, 1.2
History
#1 Updated by Bastian Waidelich about 3 years ago
- Category changed from MVC to MVC - Routing
- Status changed from New to Accepted
- Assigned To set to Bastian Waidelich
#2 Updated by Karsten Dambekalns about 3 years ago
- Target version changed from 1.1 to 1.1 RC1
#3 Updated by Gerrit Code Review about 3 years ago
- Status changed from Accepted to Under Review
Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/11732
#4 Updated by Bastian Waidelich about 3 years ago
- Target version changed from 1.1 RC1 to 1.1 beta 2
#5 Updated by Gerrit Code Review about 3 years ago
Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/11732
#6 Updated by Gerrit Code Review about 3 years ago
Patch set 1 for branch FLOW3-1.1 has been pushed to the review server.
It is available at http://review.typo3.org/11735
#7 Updated by Bastian Waidelich about 3 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 4ffcef32bca0ee9d05c743126ce9c4fd0904d726.