[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 14:46:30 CEST 2011


Hi Christian,

In the form you have the selector bound to property "ausbildungsschwerpunkt" which does not exist.

Change to "ausbildungsSchwerpunkt" and you should be good to go.

Claus

On Oct 4, 2011, at 2:18 PM, Christian Essl wrote:

> I dumped the object in extbase/classes/Reflection/ObjectAccess.php:
> 
> object(Tx_Extensionname_Domain_Model_Lehrgang)#649 (22) {
>  ["uid:protected"]=>
>  NULL
>  ["hidden:protected"]=>
>  NULL
>  ["titel:protected"]=>
>  string(4) "title"
>  ["alias:protected"]=>
>  NULL
>  ["allgemein:protected"]=>
>  NULL
>  ["lehrinhalte:protected"]=>
>  NULL
>  ["ausbildung:protected"]=>
>  NULL
>  ["finanzierung:protected"]=>
>  NULL
>  ["htmlTitle:protected"]=>
>  NULL
>  ["htmlDescription:protected"]=>
>  NULL
>  ["htmlKeywords:protected"]=>
>  NULL
>  ["htmlRobots:protected"]=>
>  NULL
>  ["htmlSitemapChanges:protected"]=>
>  NULL
>  ["htmlSitemapPriority:protected"]=>
>  NULL
>  ["ausbildungsSchwerpunkt:protected"]=>
>  NULL
>  ["themenSchwerpunkt:protected"]=>
>  object(Tx_Extbase_Persistence_ObjectStorage)#631 (3) {
>    ["warning:private"]=>
>    string(208) "You should never see this warning. If you do, you probably used PHP array functions like current() on the Tx_Extbase_Persistence_ObjectStorage. To retrieve the first result, you can use the getFirst() method."
>    ["storage:protected"]=>
>    array(0) {
>    }
>    ["isModified:protected"]=>
>    bool(false)
>  }
>  ["kurs:protected"]=>
>  object(Tx_Extbase_Persistence_ObjectStorage)#650 (3) {
>    ["warning:private"]=>
>    string(208) "You should never see this warning. If you do, you probably used PHP array functions like current() on the Tx_Extbase_Persistence_ObjectStorage. To retrieve the first result, you can use the getFirst() method."
>    ["storage:protected"]=>
>    array(0) {
>    }
>    ["isModified:protected"]=>
>    bool(false)
>  }
>  ["_localizedUid:protected"]=>
>  NULL
>  ["_languageUid:protected"]=>
>  NULL
>  ["pid:protected"]=>
>  NULL
>  ["_isClone:private"]=>
>  bool(false)
>  ["_cleanProperties:private"]=>
>  NULL
> }
> 
> For some reason all the fields after "titel" have become NULL. (titel is the first input in the formular) This only seems to happen, when the ausbildungsSchwerpunkt-selector is in the formular. When I remove it, it saves all the fields normally and no error is thrown...
> 
> The formular:
> http://pastebin.com/jrKQe9NT
> 
> 
> -----Ursprüngliche Nachricht-----
> Von: typo3-project-typo3v4mvc-bounces at lists.typo3.org [mailto:typo3-project-typo3v4mvc-bounces at lists.typo3.org] Im Auftrag von Claus Due
> Gesendet: Dienstag, 04. Oktober 2011 13:58
> An: TYPO3 v4 MVC project
> Betreff: Re: [TYPO3-mvc] fluid selector - Argument passed to x must be an instance of y, string given
> 
> Sounds strange indeed. I suspect a problem in the Property Mapper or the data given to it. Do you have this property used in other form fields too? Do you have a way to dump the POST'ed data array? You should see an integer in the ausbildungsSchwerungen value.
> 
> /Claus
> 
> On Oct 4, 2011, at 1:54 PM, Christian Essl wrote:
> 
>> Yes, also the getter-method. 
>> 
> 
> _______________________________________________
> TYPO3-project-typo3v4mvc mailing list
> TYPO3-project-typo3v4mvc at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-project-typo3v4mvc
> _______________________________________________
> 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