[TYPO3-mvc] fluid selector - Argument passed to x must be an instance of y, string given
Claus Due
claus at wildside.dk
Tue Oct 4 12:46:57 CEST 2011
Hi Christian,
Would you be able to use {object.uid} as the value argument of the selector? That should prevent your object vs. string error message.
Kind regards,
Claus
On Oct 4, 2011, at 12:27 PM, Christian Essl wrote:
> Hi,
>
> I extended my fluid-formular to load in a foreign table and put it in a selector. Now when I try to save a new object with the formular, I get the following error:
>
> PHP Catchable Fatal Error: Argument 1 passed to Tx_Extensionname_Domain_Model_Lehrgang::setAusbildungsSchwerpunkt() must be an instance of Tx_Extensionname_Domain_Model_Ausbildungsschwerpunkt, string given in ... Lehrgang.php line 448
>
> This means the option-value from the selector (which is the uid) is treated a string, but extbase expects an object. I compared my code with the blog_example (where a list of administrators is loaded into a selector) but I can't figure out the difference. Everything from the controller, tot he form and model is done the same way...
>
> The newAction and createAction look like this:
> http://pastebin.com/sRBZqkCt
>
> The model is very basic:
> http://pastebin.com/npg7K5qJ
>
> Regards,
> Christian
> _______________________________________________
> TYPO3-project-typo3v4mvc mailing list
> TYPO3-project-typo3v4mvc at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc
More information about the TYPO3-project-typo3v4mvc
mailing list