Closed Marchello74 closed 10 years ago
It seems we hit a bug here, the default driver delegated to FOSUser is orm. So it does not load the mongodb driver, to fix this (actually supporting multiple drivers) the UserServicesFactory needs to be updated that that it always registers the user manager explicitly (and does not depend on the default).
For now you can use this workaround. Add the following to your app configuration. This will enable the mongodb driver for FOSUser, but you can't load another driver for a usersystem then mongodb.
fos_user
db_driver: mongodb
Thanks for your response but when i done it i had this error
Configuration path "fos_user.db_driver" cannot be overwritten. You have to define all options for this path, and any of its sub-paths in one configuration section
What can ' do ?
I added a temporary workaround.
Update to the latest version, and add/change this to/in your app configuration.
rollerworks_multi_user:
db_driver: mongodb
The update fail and i had this error
The service "doctrine_mongodb.odm.default_configuration" has a dependency on a non-existent parameter "doctrine_mongodb.odm.default_commit_options". Did you mean one of these: "doctrine_mongodb.odm.default_connection", "doctrine_mongodb.odm.default_document_manager"?
can you give me your mongodb config please?
what should i do before update
Hhmm, that does not seem to be related to this bundle. Can you try just the FOSUserBundle an see if the problem persists?
That is ok it was mongodb-bundle thanks
Good news, I found out what is causing the original failure and how to fix its.
The FOSUserBundle only loads the mapping for one db-driver, so using another driver will not load the mapping for 'that' driver, which is causing the mapping error.
Second to this the UserListener is not properly overloaded which can result in canonical fields not being updated. So fix this properly I have come up with the following.
fos_user.backend_type_[type]
to true
I use mongodb everything go well but i can't validate registration form, it show me this error Unable to find the object manager associated with an entity of class "Acme\UserBundle\Document\User" Someone has an idea?