[TYPO3-dev] REWARD Dispatch Error after adding Boolean Property to Demand Class

g4-lisz at tonarchiv.ch g4-lisz at tonarchiv.ch
Fri Mar 30 18:00:17 CEST 2012


This issue is not solved yet! And it's really urgent now - so i will pay 
50€ to the one who solves it. For access to our test server send me a 
private message...

Cheers,
Till

On 02/20/2012 01:53 PM, Mattias Nilsson wrote:
> Why not just replace boolean with an integer value 0 and 1 instead of false
> and true?
>
> /Mattias
>
> On Mon, Feb 20, 2012 at 1:50 PM,<g4-lisz at tonarchiv.ch>  wrote:
>
>    
>> On 08.02.2012 18:38, g4-lisz at tonarchiv.ch wrote:
>>
>>      
>>> He there
>>>
>>> In my extbase project i'm using a non-persistent object "Demand" for a
>>> search form. Everything worked fine...
>>>
>>> Now i added a new property "isLocalKanton" to this Demand class:
>>>
>>>         /*
>>>          * Local to Kanton
>>>          *
>>>          * @var boolean $isLocalKanton
>>>          */
>>>         protected $isLocalKanton = false;
>>>
>>>         /**
>>>          * @param  boolean $isLocalKanton
>>>          * @return void
>>>          */
>>>         public function setIsLocalKanton($**isLocalKanton) {
>>>                 $this->isLocalKanton = (boolean)$isLocalKanton;
>>>         }
>>>
>>>         /**
>>>          * @return boolean isLocalKanton
>>>          */
>>>         public function getIsLocalKanton() {
>>>                 return $this->isLocalKanton;
>>>         }
>>>
>>> In the view i added a checkbox to the form:
>>>
>>> <f:form name="demand" pluginName="fe_search_results" object="{demand}"
>>> action="results" pageUid="26">
>>> <f:form.checkbox property="isLocalKanton" value="1" />
>>>     [...]
>>> </f:form>
>>>
>>> Before this change, everything worked flawlessly with other boolean
>>> properties.
>>>
>>> Now i get the error: "Could not ultimately dispatch the request after 101
>>> iterations. Most probably, a @dontvalidate annotation is missing on
>>> re-displaying a form with validation errors."
>>>
>>> Why is this? I can't see any mistake in my code...
>>>
>>> The action for displaying the search form looks like this:
>>> /**
>>>   * Displays Fachabteilung Search Form
>>>   *
>>>   * @param Tx_Hplusinfo_Domain_Model_**SearchDemand $demand The optional
>>> default values
>>>   * @return void
>>>   * @dontvalidate $demand
>>>   */
>>> public function abteilungAction(Tx_Hplusinfo_**Domain_Model_SearchDemand
>>> $demand = NULL) {
>>>     if ($demand === NULL) {
>>>         $demandSession = unserialize($GLOBALS["TSFE"]->**fe_user->getKey("ses",
>>> "demand"));
>>>         if ( ($demandSession instanceof Tx_Hplusinfo_Domain_Model_**
>>> SearchDemand)
>>> &&  ($demandSession->getPageId() == $GLOBALS["TSFE"]->id)
>>>         ) {
>>>             $demand = $demandSession;
>>>         }
>>>         else {
>>>             $demand = new Tx_Hplusinfo_Domain_Model_**SearchDemand();
>>>             $GLOBALS["TSFE"]->fe_user->**setKey("ses", "demand", NULL);
>>>         }
>>>     }
>>>
>>>     $this->view->assign('demand', $demand);
>>>     $this->view->assign('**abteilungs', $this->abteilungRepository->**
>>> findAll());
>>> }
>>>
>>> If i the form checkbox is commented out, the error disappears. Again, all
>>> other checkboxes work fine!
>>>
>>> I commented out the catch {} in the dispatcher loop
>>> (typo3_src-4.6.1/typo3/sysext/**extbase/Classes/MVC/**Dispatcher.php:93).
>>> Now it throws a Tx_Extbase_MVC_Exception_**StopAction in
>>> /typo3_src-4.6.1/typo3/sysext/**extbase/Classes/MVC/**
>>> Controller/AbstractController.**php:277:
>>>
>>>         public function forward($actionName, $controllerName = NULL,
>>> $extensionName = NULL, array $arguments = NULL) {
>>>                 $this->request->setDispatched(**FALSE);
>>>                 $this->request->**setControllerActionName($**actionName);
>>>                 if ($controllerName !== NULL) $this->request->**
>>> setControllerName($**controllerName);
>>>                 if ($extensionName !== NULL) $this->request->**
>>> setControllerExtensionName($**extensionName);
>>>                 if ($arguments !== NULL) $this->request->setArguments($**
>>> arguments);
>>>                 throw new Tx_Extbase_MVC_Exception_**StopAction();
>>>         }
>>>
>>> The request is forwarded to another action? Maybe that's a hint for
>>> someone who knows the mechanisms..
>>>
>>> Any help will be much appreciated!
>>>
>>>        
>> Sorry for bothering you...
>>
>> This issue is still not solved and our extension should be moved to
>> production soon :(
>>
>> I have no idea how to debug this.
>>
>> Maybe someone could give me the name of a person who is in the development
>> of extbase/dispatcher?
>>
>>
>> Cheers,
>> Till
>> ______________________________**_________________
>> TYPO3-dev mailing list
>> TYPO3-dev at lists.typo3.org
>> http://lists.typo3.org/cgi-**bin/mailman/listinfo/typo3-dev<http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-dev>
>>
>>      
> _______________________________________________
> TYPO3-dev mailing list
> TYPO3-dev at lists.typo3.org
> http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-dev
>    




More information about the TYPO3-dev mailing list