Reputation: 6137
I am trying to use PUGXMultiUserBundle in my application ; I followed the instructions in documentation, but when I go on the registration page, I got an error :
Impossible to set the class discriminator, because the class "Myapp\UserBundle\Entity\SellerUser" is not present in the entities list
I think that everything is well configured, but I can't see where the bug is.
Upvotes: 2
Views: 821
Reputation: 491
@JérémyDutheil
That is not a solution to this problem. It is similar to put the PUGXMultiUserBundle configuration code in app/config.yml or in relative bundles config file and importing it to app/config.yml.
You forgot to configure PUGXMultiUserBundle in your config file. You have to define your user entities as given below:
pugx_multi_user:
users:
user_one:
entity:
class: Acme\UserBundle\Entity\UserOne
user_two:
entity:
class: Acme\UserBundle\Entity\UserTwo
This is the appropriate solution for the problem you posted.
Upvotes: 1
Reputation: 6137
I finally found my problem quickly ; in the documentation, it is written that you should put the configuration relative to the bundle into the bundle's config.yml (ie MyApp\MyBundle\Resources\config\config.yml)
I putted it into the app config.yml and it works ; don't know if it is a known issue, but for me it solved the problem
EDIT : just had to import my bundle's config.yml from the app config.yml to get it working, everything is fine and understood now
Upvotes: 2