[Flow] strange behaviour w. select/multiple and spl_object_hash

Rémy DANIEL dogawaf at no-log.org
Thu May 7 07:45:42 CEST 2015


Hi

Could you share your fluid code?
I had a problem with a select multiple and no option to show: the select is
not included in trustedProperties.

Cheers

Le mer. 6 mai 2015 à 15:01, Tomas M <flow at 46dev.de> a écrit :

> Hello,
>
> I've a strange effect when using a selectbox in combination with multiple
> attribute:
> this box ist filled via controllers newAction reprository->findAll().
>
> In my test case the model has only two properties "$name" of type string
> and
> $items of type
> \Doctrine\Common\Collections\Collection<\xyz\project\Domian\Model\item>
> Both props are mandatory, at least one "item" must be choosen.
>
> The selectbox has N options plus one option "please select" with option
> value "" (empty string).
>
> By opening the form the selectbox is blank (no text).
> If one sends the empty form, it reopens with correct error messages.
> Afterwards the selectbox says "please select", I fill the name field and
> send the
> form. This results in exception "spl_object_hash() expects parameter 1 to
> be object, null given..."
>
> When I remove the multiple attribute, no exception is thrown!
>
> Question: the items collection has a Flow validation
> @Flow\Validate(type="NotEmpty")
> Why is the exception thrown only if the selectbox is of type multiple and
> why the validation not used first?
>
> Has someone an idea?
>
> _______________________________________________
> Flow mailing list
> Flow at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/flow
>


More information about the Flow mailing list