[TYPO3-mvc] Passing objects from view to controller - Typo3 6.2.9

Axel Beckert a.beckert at ccmagnus.de
Sat Feb 7 10:14:22 CET 2015


Dear All,

Sorry for writing in German before. So here is the problem again:
I faced the following problem in Typo3 6.2.9

When I pass some objects to the controller by using f:link action and arguments, the objects will arrive at the controller but he does not register them as they what I have send. For a better explanation here the single code sections:


at the partial:

<f:link.action action="new" controller="ForeignProductMeasuring" arguments="{planRow : planRow, plan:plan}">neue Dosierung anlegen</f:link.action>

the generated link in the site:

"index.php?id=1&tx_desinfektionsplan_desinfektionsplan%5BplanRow%5D=12&tx_desinfektionsplan_desinfektionsplan%5Bplan%5D=16&tx_desinfektionsplan_desinfektionsplan%5Baction%5D=new&tx_desinfektionsplan_desinfektionsplan%5Bcontroller%5D=ForeignProductMeasuring&cHash=2adafaba9c56b134d4d5ae382ee5d57b"

what shows the the arguments are correct in my opinion.

Here the action at the controller:

public function newAction(\Orochemie\Desinfektionsplan\Domain\Model\ForeignProductMeasuring $newForeignProductMeasuring = NULL,
\Orochemie\Desinfektionsplan\Domain\Model\PlanRow $planRow,
\Orochemie\Desinfektionsplan\Domain\Model\Plan $plan) {

\TYPO3\CMS\Extbase\Utility\DebuggerUtility::var_dump( $this->request->getArguments());
$this->view->assign('newForeignProductMeasuring', $newForeignProductMeasuring);
$this->view->assign('planRow', $planRow);
$this->view->assign('plan', $plan);

}

The error looks like this:

#1: PHP Catchable Fatal Error: Argument 2 passed to Orochemie\Desinfektionsplan\Controller\ForeignProductMeasuringController::newAction() must be an instance of Orochemie\Desinfektionsplan\Domain\Model\PlanRow, none given in /kunden/137629_70806/typo3/typo3conf/ext/desinfektionsplan/Classes/Controller/ForeignProductMeasuringController.php line 46

For me it looks like that he don´t knows the objects which he gets. But if I check the arguments with $this->request->getArguments() then I see that all arguments arrive at the controller.

Does anybody has a idea of what is the problem here?

Thanks in advance



More information about the TYPO3-project-typo3v4mvc mailing list