[Flow] Re: Removing an object, that has references, leads to "Exception thrown without a stack frame in Unknow
Christian EÃl
essl at incert.at
Mon Jul 8 08:26:49 CEST 2013
Quote: Christian Eßl (cessl) wrote on Sun, 07 July 2013 16:30
----------------------------------------------------
> Hi,
>
> I have defined a Page Object. Pages created with my model can have both a parent and multiple subpages, which are also "Page" objects. The idea is to form a simple pagetree. Also I have defined a simple boolean $root, to easily find the root page of my pagetree.
>
> Here is the model:
> http://pastebin.com/hR3zErsN
>
> I created a SetupController with the following code, that should remove all pages from the repository, when it's called:
>
> $root = $this->pageRepository->findRoot(); // this returns the root page which has no other parent page
> $this->pageRepository->remove($root);
> $this->persistenceManager->persistAll();
> return 'success!';
>
> When I try to call my SetupController, I just get a blank page and no pages were deleted. I looked in the apache error log and the following error was thrown:
>
> PHP Fatal error: Exception thrown without a stack frame in Unknown on line 0
>
> This error is very vague, so I have no idea how to procceed from here. Any ideas what I did wrong?
----------------------------------------------------
Maybe I am just thinking it wrong and it is not possible with TYPO3 Flow/Doctrine to have a OneToMany/ManyToOne-Relation between objects of the same model?
Then what would be the best way with TYPO3 Flow to implement a simple pagetree-structure, like this?
- A Page can have many subpages
- A Page always has a Parent Page (except for the root)
More information about the Flow
mailing list