[Flow] Curl PUT doesn't works

Bastian Waidelich bastian at typo3.org
Fri Mar 21 10:13:41 CET 2014


Rémy DANIEL wrote:

Hi,

> If I remember, the identity in the url overrides the body, so it is the
> original object which is passed to updateAction, not the updated one.

Exactly. This is because we merge GET and POST arguments very early and 
the "<uuid>"-string overrides the POST-array.

This should be "fixed" with https://review.typo3.org/21134 - but that 
relies on the HTTP components [1] that is almost a year old by now and 
needs rebasing & reviews.. (I'll work on this again asap!)


> I had to add objectType to my route, like this :
>
> -
>    name: 'Person single GET/POST/DELETE/PUT'
>    uriPattern: 'persons/{person}'
>    defaults:
>      '@package': 'Blueline.api'
>      '@controller': 'Person'
> *  routeParts:*
> *    'person':*
> *      objectType: 'Blueline\Core\Domain\Model\Person'*

Right, that resolves the issue because the "IdentityRoutePart" that is 
used for {person} returns array('__identity' => '<uuid>') which can be 
merged with the other data.
If you don't specify a custom "uriPattern" for the object route part no 
"ObjectPathMapping" is created (at least if there are no custom identity 
properties defined, see [2])


[1] https://review.typo3.org/20821
[2] http://forge.typo3.org/issues/56607


-- 
Bastian Waidelich


More information about the Flow mailing list