[TYPO3-dev] [Extbase] TYPO3 Backend - Create Record and 1:n relations on creation

Philipp Schiffmann p.schiffmann at bitmotion.de
Fri Mar 13 09:38:01 CET 2015


Hi Tizian,

unlike Bernhard I don't know the extension you are working on, so you might
want to try his idea first, but I can tell you what your error means and
how to avoid it.

This, it seems, cannot be processed correctly. The error is "quite"
> explicit: the property "0" cannot be mapped.
>
Extbase automatically protects your Fluid forms against some kind of
attacks with a request hash:
http://docs.typo3.org/typo3cms/ExtbaseFluidBook/9-CrosscuttingConcerns/3-programming-secure-extensions.html#request-hashes-hmac
When Extbase tries to convert the POST parameters to your model it first
checks for every property if it is allowed in the request hash and aborts
if that's not the case – with the error message you posted here. To avoid
this, you have two possibilities:
1. Render the form fields with a Fluid viewhelper and tell it which
property it should render. Fluid will then include that property path in
the request hash.
2. Allow the mapping of this path from inside your controller like this:
public function initializeAction() {
$this->arguments['review']->getPropertyMappingConfiguration()
->forProperty('dbrecord')
->allowAllProperties();
}

Hope that helps!
Best regards
Philipp



More information about the TYPO3-dev mailing list