[TYPO3-mvc] problem with fed.contains viewhelper :: "Cannot cast object of type "Tx_Extbase_Persistence_ObjectStorage" to string."

Roland most.wanted at gmx.at
Thu Feb 23 11:53:10 CET 2012

hi everybody,

i tried this one...

<fed:contains haystack="{partner.partnercategory}" needle="7">

…but i got this error message in the FE:

--- quote ---
Oops, an error occurred!
Cannot cast object of type "Tx_Extbase_Persistence_ObjectStorage" to string.
--- /quote ---

then i tried this one, but it did not change anything:

<fed:contains haystack="{partner.partnercategory}" needle="{0: '7'}">

then i read the source code of ContainsViewHelper.php and 
AbstractConditionViewHelper.php of EXT:fed.

i guess it should work with my first code snippet.

does anybody have a clue, what i do wrong here?

kind regards.


More information about the TYPO3-project-typo3v4mvc mailing list