Herzult/HerzultForumBundle — Issue #37: topic-category problem. Help please!
Author: domiboo
Created: 2012-02-21 10:44:18+00:00
State: open

Hello,

I am new in Symfony and I am trying to implement your bundle in a project. I feel very stupid because I have been working a whole day on a single issue and I cannot really pin it. Here is my (long) error message

Catchable Fatal Error: Argument 1 passed to Herzult\Bundle\ForumBundle\Model\Topic::setCategory() must be an instance of Herzult\Bundle\ForumBundle\Model\Category, string given, called in C:\Users\CrazyMum\wamp_with_symphony\wamp\www\Forum_Sf2_HerzultNew\vendor\symfony\src\Symfony\Component\Form\Util\PropertyPath.php on line 346 and defined in C:\Users\CrazyMum\wamp_with_symphony\wamp\www\Forum_Sf2_HerzultNew\vendor\bundles\Herzult\Bundle\ForumBundle\Model\Topic.php line 313

Apparently it does not recognize my category as an object instance of Category and I do not understand why since I have checked in many places and I can get its properties so it is indeed a Category instance. Can it be related with the way the topic, post and category are defined in the database? And, by the way, in the topic class, its category property is related to what? The id of category instance or its name or ?? Same question for the relation between post and topic. I am completely blocked and need your help, if possible.

Thank you in advance.
Domi