[TYPO3-mvc] create action/form is not returning an object but an array -> error
Thomas "Thasmo" Deinhamer
thasmo at gmail.com
Mon Feb 22 19:14:43 CET 2010
I'm not sure, but maybe the form name attribute should
match the model name. So 'name="newCatalogOrder"' may be wrong
and should be called 'name="CatalogOrder"' or whatever your model class
is called.
Thomas
Am 22.02.2010 18:57, schrieb Franz Koch:
> On 22.02.2010 18:47, Robert Böttner wrote:
>> Is everything ok when you check your returned POST data with
>> $this->request->getArguments(); ?
>
> do you mean if I see any POST data in my request? Yes, everything's in
> place.
>
> I think the problem might be here:
> - Class: Tx_Extbase_MVC_Controller_Argument
> - Method: transformValue (line 341)
>
> if ($this->dataTypeClassSchema !== NULL) {
> // The target object is an Entity or ValueObject.
> if (is_numeric($value)) {
> $this->origin = self::ORIGIN_PERSISTENCE;
> $transformedValue = $this->findObjectByUid($value);
> } elseif (is_array($value)) {
> $this->origin = self::ORIGIN_PERSISTENCE_AND_MODIFIED;
> $transformedValue = $this->propertyMapper->map(array_keys($value),
> $value, $this->dataType);
> }
> } else {
> ...
>
>
> $this->propertyMapper->map is only returning boolean TRUE/FALSE and not
> a new object. Also doesn't the "map" method of the propertyMapper not
> convert the $value array to an object. Thus something seems to be quite
> wrong there. But I wonder why nobody else seems to have a problem. I'm
> using latest SVN.
>
More information about the TYPO3-project-typo3v4mvc
mailing list