[TYPO3-mvc] Tx_Extbase_MVC_Exception_InfiniteLoop
Mark Kuiphuis
spam at markyourweb.com
Wed Jan 4 00:05:53 CET 2012
Hi Claus,
Thanks again for your help :-)
I actually would like to go back to Extbase 1.3, so will definitely give that a
try....(not because of Extbase, but because of the PHP requirements of TYPO3 4.6)
I also checked your proposal with changing the checkbox. Unfortunately, after ticking
the box and submitting the form (where validation fails because of an incorrect email
address I put in another field) the form is being shown again. The input fields which
have already been filled in are prefilled again, but the checkboxes have their state
set to unticked :(
I changed my form field from:
<f:form.checkbox property="newsletter" value="1" checked="{order.newsletter} == 1" />
into
<f:form.checkbox property="newsletter" value="1" checked="{f:if(condition:
order.newsletter, then: 'checked')}" />
I use the extension ExtDebug to dump some info about models and in my newAction I added:
Tx_ExtDebug::var_dump($order);
In the frontend I then see
Extbase Variable Dumo
NULL
Even after submitting at least some values, the value remains NULL....
(Maybe because the model contained data which would invalidate the model, therefore a
new model has not been created yet and as such remains NULL...So where do these input
fields and select fields get their value from, as most likely I will also be able to
retrieve the information for the checkboxes and radio buttons from that spot :-) (or
does my mind not want to work anymore and did I loose all hope of ever finding a
solution?)
Cheers, Mark
On 4/01/12 12:51 AM, Claus Due wrote:
> Hi Mark,
>
> Hmm. Not entirely sure now. It may only have been necessary in Extbase 1.3 - I don't know if 1.4 has the same problem. I just remember having to set this to 0 on an earlier project exactly because of the 101 redirects and @dontvalidate issue. Extbase kept on validating regardless of @dontvalidate when the value was 1. But that was an Extbase 1.3 install...
>
> Anyway if validation works now you're on track. You should be able to fix the checkbox/radio issue by using a manual inline f:if for checked status:
>
> <f:form.checkbox checked="{f:if(condition: object.checkboxProperty, then: 'checked')}" />
>
> Cheers,
> Claus
More information about the TYPO3-project-typo3v4mvc
mailing list