[TYPO3-mvc] Very strange "serialize Domain Object" error
g4-lisz at tonarchiv.ch
g4-lisz at tonarchiv.ch
Fri Sep 30 00:49:46 CEST 2011
On 09/27/2011 06:35 PM, g4-lisz at tonarchiv.ch wrote:
> Hi there
>
> I have a very stange behaviour with one of my actions:
>
> public function resultsAction(Tx_Myext_Domain_Model_SearchDemand
> $demand) {
> $paginate = new Tx_Myext_Domain_Model_Paginate();
> $paginate -> setPage($_REQUEST['page']);
> $paginate -> setRecordsPage(5);
> $paginate -> setRecordsAll(45); <<==
> //$paginate -> setRecordsAll(
> $GLOBALS["TSFE"]->fe_user->getKey("ses","recordsAll"));
>
> $assignments['paginate'] = $paginate;
> $assignments['demand'] = $demand;
> $assignments['entfernungs'] =
> $this->entfernungRepository->findDemanded($demand, $paginate);
>
> $this->view->assignMultiple($assignments);
> }
>
> When i comment out the line "$paginate -> setRecordsAll(45);" then
> there is no error.
>
> When i leave this line, i get the error: "Could not serialize Domain
> Object Tx_Myext_Domain_Model_SearchDemand. It is neither an Entity
> with identity properties set, nor a Value Object."
>
> Tx_Myext_Domain_Model_Paginate object method has side effects on
> Tx_Myext_Domain_Model_SearchDemand object?!? Looks to me like a bug...
>
> On the same page i use another (prior) content plugin with this action:
>
> public function demandAction(Tx_Myext_Domain_Model_SearchDemand
> $demand) {
> $recordsAll = $this->entfernungRepository->countDemanded($demand);
> $GLOBALS["TSFE"]->fe_user->setKey("ses", "recordsAll", $recordsAll);
> $this->view->assignMultiple(array('count' => $recordsAll, 'demand'
> => $demand));
> }
>
> Any help would be much appreciated!
>
Not solved yet...
I filed a bug report here: http://forge.typo3.org/issues/30370
Cheers,
Till
More information about the TYPO3-project-typo3v4mvc
mailing list