[TYPO3-mvc] Tx_Extbase_MVC_Exception_InfiniteLoop

Mark Kuiphuis spam at markyourweb.com
Thu Jan 5 04:02:46 CET 2012


On 4/01/12 11:45 PM, Claus Due wrote:
> Hi Mark,
>
> It could be that Fluid is not recognizing the booleans as booleans - in your model, try in your getter:
>
> return (bool) $this->booleanProperty;
>
> This will make sure that if the property is set and is for example an integer (this could happen in the propertymapper, I'm not sure) it will be read as a boolean regardless.
>
> Cheers,
> Claus
>
> On Jan 4, 2012, at 8:56 AM, Mark Kuiphuis wrote:
>
>> On 4/01/12 11:36 AM, Claus Due wrote:
>>> Hi Mark,
>>>
>>> In your newAction try doing:
>>>
>>> if ($order === NULL) {
>>>    $order = $this->objectManager->create($modelClassName);
>>> }
>>>
>>> ...to ensure that $order is in fact an object and will be stored in the form to enable object accessor mode.
>>>
>>> You can set any defaults you like on that object then.
>>>
>>> Sounds like Fluid isn't detecting the object because it is never registered in the form. So you need to create an object to make the form render correctly the very first time - if you get validation errors the object will exist and should work as expected.
>>>
>>> Cheers,
>>> Claus
>>
>> Hi Claus,
>>
>> I just tried this and although I can set the initial state of the checkboxes, after submitting the form with a failed validation, the values are being reset to their initial values....
>>
>> So, just wondering why Fluid doesn't detect the object? Could it have to do that I'm using a $this->forward() action in the createAction function? Or shouldn't that make a difference?
>>
>> Cheers, Mark

Hi Claus,

I think it is caused by this bug.... http://forge.typo3.org/issues/8854

Are there any workarounds?

Cheers, Mark


More information about the TYPO3-project-typo3v4mvc mailing list