[TYPO3-german] irgendwie werden Datensätze nicht in die DB geschrieben ??? eigene extbase extension...

Dr. Dieter Porth typo3 at mobger.de
Sun Jul 17 22:02:25 CEST 2016


Hallo Ralf-Rene,

der Code sieht für mich okay aus.

Hast du das Problem mit xdebug untersucht?

Vermutung: Könnte es sein, dass eine Required-Angabe in deinem 
$newLiveDialog fehlt und du als Parameter schon null bei der 
createAction empfängst.

Mit besten Grüßen

   Dieter


Am 17.07.2016 um 20:27 schrieb Ralf-Rene Schröder:
> Hallo...
> ich bin gerade völlig ratlos
> was sonst mit anderen Models problemlos klappt, das will hier gerade
> nicht so wie ich will ???
>
> hier mal etwas vereinfacht die show, new und create Actionen:
> (es wird aber auch in der reduzierten Form der $newLiveDialog nicht in
> der datenbank angelegt und ist beim Redirect zu show logischerweise auch
> nicht vorhanden, was natürlich dann folgenden Fehler erzeugt:
> PHP Catchable Fatal Error: Argument 1 passed to
> Vend\Ext\Controller\LiveDialogController::showAction() must be an
> instance of Vend\Ext\Domain\Model\LiveDialog, NULL given in ... line 107 )
>
> /**
>   * action show
>   * @param \Vend\Ext\Domain\Model\LiveDialog $liveDialog
>   * @ignorevalidation $liveDialog
>   * @return void
>   */
> (Zeile:107) public function showAction(\Vend\Ext\Domain\Model\LiveDialog
> $liveDialog) {
>    $this->view->assign('liveDialog', $liveDialog);
> }
>
> /**
>   * action new
>   * @param \Vend\Ext\Domain\Model\LiveDialog $newLiveDialog
>   * @ignorevalidation $newLiveDialog
>   * @return void
>   */
> public function newAction(\Vend\Ext\Domain\Model\LiveDialog
> $newLiveDialog = NULL) {
>    $this->view->assign('newLiveDialog', $newLiveDialog);
> }
>
> /**
>   * action create
>   * @param \Vend\Ext\Domain\Model\LiveDialog $newLiveDialog
>   * @return void
>   */
> public function createAction(\Vend\Ext\Domain\Model\LiveDialog
> $newLiveDialog) {
>    $this->liveDialogRepository->add($newLiveDialog);
>    $this->redirect('show','LiveDialog',NULL,array('liveDialog' =>
> $newLiveDialog) );
> }
>
>
> ich habe es auch schon mit erzwungenem persistieren versucht mit:
> $this->persistenceManager =
> \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance("TYPO3\\CMS\\Extbase\\Persistence\\Generic\\PersistenceManager");
>
> und an entsprechender stelle dann:
> $this->persistenceManager->persistAll();
>
> hat jemand noch eine Idee was hier falsch laufen könnte ???
> (bei anderen Objekten klappt alles wie erwartet)
>



More information about the TYPO3-german mailing list