Task #13715

Calling Repository->remove($object) breaks application.

Added by Conor Hackett over 10 years ago. Updated over 10 years ago.

Should have
Target version:
Start date:
Due date:
% Done:


Estimated time:


Hi All,

I'm pretty new here so apologies if the solution to my problem is obvious.

Anyway, I'm working through the getting-started tutorial (blog) and decided I wanted a link to delete a blog post.

I've setup a function in in the PostController.php file as follows:

  * Deletes an existing post.
  * @param \F3\Blog\Domain\Model\Post $post A post object to be deleted.
  * @return void
public function deleteAction(\F3\Blog\Domain\Model\Post $post) {
$this->postRepository->remove($post); //This line breaks the application.
$this->flashMessageContainer->add('Your post has been deleted');

After I call this method I get the following error:
#1: Catchable Fatal Error: Argument 1 passed to F3\FLOW3\Persistence\DataMapper::mapSingleObject() must be an array, boolean given, called in O:\fr_test\flow3_blog_tut\Packages\Framework\FLOW3\Classes\Persistence\DataMapper.php on line 258 and defined in O:\fr_test\flow3_blog_tut\Packages\Framework\FLOW3\Classes\Persistence\DataMapper.php line 121


Updated by Conor Hackett over 10 years ago

Sorry, I hit update instead of preview.

After this error is created it is carried through on all pages. Nothing will work afterwards so I need to extract my backup and start from there.

I'm not sure what is causing this. I'm sure somebody else has come across this before.

Any guidance is greatly appreciated.

Thanks in advance.


Also available in: Atom PDF