[TYPO3-mvc] CollectionValidator.php in 6.2.x
Johannes C. Schulz [EnzephaloN IT-Solutions]
info at enzephalon.de
Thu Aug 21 16:33:32 CEST 2014
Hello Helmut
Thats not the point, but I updated my model. Now I use objectstorage for accessing my object:
public function getPsoabilling(){
Return $this->psoabilling;
}
Works fine too, but does not help fixing the 'foreach'-error of CollectionValidator.
Only commenting out the variables (Tx_News_Domain_Model_News) shown in trace helped. I know thats a bad solution and looking forward for a netter one.
Viele Grüße
Johannes C. Schulz - EnzephaloN IT-Solutions
(von unterwegs gesendet)
On 21. August 2014 16:17:13 MESZ, Helmut Hummel <helmut.hummel at typo3.org> wrote:
>On 21.08.14 08:49, Johannes C. Schulz - EnzephaloN IT-Solutions wrote:
>> Hello
>>
>> I run into problems by extending tx_news with own model.
>> All (LIST- & PREVIEW-view) works fine except DETAIL-view. DETAL-view
>throws
>> an error about "Invalid argument supplied for foreach() in
>>
>/PATH/typo3/sysext/extbase/Classes/Validation/Validator/CollectionValidator.
>> php line 89". So I searched and searched, but found nothing.
>
>What is the data type of $value at this point?
>
>> I tried to add @ignorevalidation to my field - doesn't help.
>
>This ignores validation errors but does not prevent the validator from
>being called.
>
>> /**
>> * @var string
>> * @ignorevalidation
>> * @lazy
>> */
>> protected $psoabilling;
>>
>> /**
>> * @return array
>> */
>> public function getPsoabilling(){
>
>You annotate string for the property but the getter returns an array?
>How does the TCA of the field looks like?
>
>And btw. instead of using a reposiory here, you should consider
>properly
>annotating the property and let Extbase fetch the related objects...
>
>Kind regards,
>Helmut
>
>--
>Helmut Hummel
>Release Manager TYPO3 6.0
>TYPO3 Core Developer, TYPO3 Security Team Member
>
>TYPO3 .... inspiring people to share!
>Get involved: typo3.org
>_______________________________________________
>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