[TYPO3-mvc] Tx_Extbase_MVC_Exception_InfiniteLoop

Mark Kuiphuis spam at markyourweb.com
Wed Jan 4 08:56:52 CET 2012


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




More information about the TYPO3-project-typo3v4mvc mailing list