[TYPO3-dev] Extbase Property Mapping - Select box and null values

Tschemernjak Martin Martin.Tschemernjak at cellent.at
Tue Aug 26 11:50:54 CEST 2014


Hi,

In my Fluid template I have a selectbox with a prepended Value:

<f:form.select property="derzeitigesStudium" name="derzeitigesStudium" prependOptionLabel="- please choose -" prependOptionValue="" options="{studienRichtung}" optionValueField="uid" optionLabelField="titel"/>

When I submit the form and "- please choose -" is selected, I get the following error:

#1297759968: Exception while property mapping at property path "":PHP Catchable Fatal Error: Argument 1 passed to ...... must be an instance of ..... , null given, called in....

I know what the problem is, that the Property Mapper can't map the submitted null value to an object which leads to this exception.
But how can I tell the Property Mapper to just set the property to null and not try to convert it?

I'm using Typo3 6.2.0.


Kind regards,

Martin


Martin Tschemernjak
Consultant
Web, Social & Mobile Solutions

cellent AG
...more than just IT

Lassallestra?e 7b
A-1020 Wien
Tel:    +43 (1) 532 78 03-550
Fax:    +43 (1) 532 78 03-33
Mobil:  +43 (676) 841 785-333
Martin.Tschemernjak at cellent.at<mailto:Martin.Tschemernjak at cellent.at>
www.cellent.at <http://www.cellent.at/>

Firmensitz Wien - Handelsgericht Wien - FN 208229w

Diese E-Mail sowie etwaige Anlagen sind ausschlie?lich f?r den Adressaten bestimmt und k?nnen vertrauliche oder gesetzlich gesch?tzte Informationen enthalten. Wenn Sie nicht der bestimmungsgem??e Empf?nger sind, unterrichten Sie bitte den Absender und vernichten Sie diese E-Mail. Anderen als dem bestimmungsgem??en Adressaten ist es untersagt, diese E-Mail zu speichern, weiterzuleiten oder ihren Inhalt, auf welche Weise auch immer, zu verwenden. Wir verwenden aktuelle Virenschutzprogramme. F?r Sch?den, die dem Empf?nger gleichwohl durch von uns zugesandte, mit Viren befallene E-Mails entstehen, schlie?en wir jede Haftung aus.

The information contained in this e-mail or attachments is intended only for its addressee and may contain confidential and/or privileged information. If you have received this e-mail in error, please notify the sender and delete the e-mail. If you are not the intended recipient, you are hereby notified, that saving, distribution or use of the content of this e-mail in any way is prohibited. We use updated virus protection software. We do not accept any responsibility for damages caused anyhow by viruses transmitted via e-mail.




More information about the TYPO3-dev mailing list