[TYPO3-mvc] create action/form is not returning an object but an array -> error

Franz Koch typo3.RemoveForMessage at elements-net.de
Mon Feb 22 18:57:51 CET 2010


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.

-- 
kind regards,
Franz Koch


More information about the TYPO3-project-typo3v4mvc mailing list