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

g4-lisz at tonarchiv.ch g4-lisz at tonarchiv.ch
Mon Feb 6 22:36:26 CET 2012


On 06.02.2012 22:23, Claus Due wrote:
>> I suppose that this is a misleading error message. Why should there be a validation issue?
> The error is a bit misleading. But speaking in Dispatcher terms it is completely correct - because the loop happens when the property mapper is unable to construct a valid object on either end of the origin/destination after more than 100 attempts (this limit is hardcoded in the Dispatcher).
>
> The "real" cause for this problem could be many, but in order to see the true error message (which will come from the argument mapper) you must have a @dontvalidate annotation on one of the actions - and usually this would be the action you send the request from, where you reload the form with the erroneous form object and can use the form errors ViewHelper to see what went wrong.
>
> I assume you eliminated the usual error suspects (namely, the field is displayed and saves correctly in the BE)?
>
Hi Claus,

the object is a non-persistent demand for a search form... it ha no 
repository.

This Demand class object has a lot more of checkbox-related properties 
(boolean) and the getter/setter methods and definition of them look all 
the same. I just added one more today. The neAction looks like this and 
there was never an issue with it before:

     /**
      * 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());
     }

That's why i think it's not validation related... there's no difference 
between the lately added property and all the older ones:

class Tx_Hplusinfo_Domain_Model_SearchDemand extends 
Tx_Extbase_DomainObject_AbstractEntity {
     [...]
     /**
      * Leistungserbringung
      *
      * @var boolean $isLeistungserbringung
      */
     protected $isLeistungserbringung = false;

     /**
      * Verwaltungsstandort
      *
      * @var boolean $isVerwaltungsstandort
      */
     protected $isVerwaltungsstandort = false;

     /**
      * Datenveroeffentlich
      *
      * @var boolean $isDatenOeffentlich
      */
     protected $isDatenOeffentlich = false;

     /**
      * IsKonzern
      *
      * @var boolean $isKonzern
      */
     protected $isKonzern = false;

     /**
      * Datenveroeffentlich
      *
      * @var boolean $isDatenOeffentlich
      */
     protected $isDatenNichtOeffentlich = false;

     /**
      * IsOffline
      *
      * @var boolean $isOffline
      */
     protected $isOffline = false;

     /**
      * hasBericht
      *
      * @var boolean $hasBericht
      */
     protected $hasBericht = false;

     /**
      * hasBilder
      *
      * @var boolean $hasBilder
      */
     protected $hasBilder = false;

[...]

     /*
      * Local to Kanton
      *
      * @var boolean $isLocalKanton
      */
     protected $isLocalKanton = false;
             ^^^^^^^^^
             this is the new property

}

Maybe there is some harcoded size limit for POST values and me Demand 
object is too big?

Cheers,
Till




More information about the TYPO3-project-typo3v4mvc mailing list