I'm in a migration process from typo3 6.2.31 to 7.6.23
I have the following function:
public function createAction(\TYPO3\Institutsvideoverwaltung\Domain\Model\Category $newCategory) {
$contentCat = $this->request->getArgument('newCategory');
if ($contentCat['isRoot'] == '1') {
$this->categoryRepository->add($newCategory);
$this->addFlashMessage($newCategory->getName(), 'Kategorie erfolgreich angelegt!', \TYPO3\CMS\Core\Messaging\AbstractMessage::OK);
} else {
if (!empty($_POST['tx_institutsvideoverwaltung_auditgarant_institutsvideoverwaltungvideoverwaltungbackend']['catAllocationUIDs'])) {
$catAllocationUIDs = $this->request->getArgument('catAllocationUIDs');
foreach ($catAllocationUIDs as $catAllocationUID) {
$category = $this->categoryRepository->findByUid($catAllocationUID);
$category->addChildCategory($newCategory);
$this->categoryRepository->update($category);
}
$this->addFlashMessage($newCategory->getName(), 'Kategorie erfolgreich angelegt!', \TYPO3\CMS\Core\Messaging\AbstractMessage::OK);
} else {
$this->addFlashMessage('Das Objekt wurde nicht angelegt, da keine Zuordnung erfolgt ist. Wenn es sich um kein Wurzelelement handelt, nehmen Sie zumindest eine Zuordnung vor.', '', \TYPO3\CMS\Core\Messaging\AbstractMessage::ERROR);
}
}
/* }*/
$this->redirect('list');
}
It says all works fine, but it does not persist data. What could be the problem?
When I add manually a record to databse it is not shown as well :(