[TYPO3-mvc] Tx_Extbase_MVC_Exception_InfiniteLoop

Claus Due claus at wildside.dk
Wed Jan 4 14:45:37 CET 2012


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
> 
> 
> _______________________________________________
> 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