maschmann / TranslationLoaderBundle

Symfony2 bundle with database translation loader
23 stars 9 forks source link

Circular reference #16

Closed emgiezet closed 10 years ago

emgiezet commented 10 years ago

Helo!

Just found Your bundle but when trying to install it on sf2.3 it geve me:

 Circular reference detected for service "doctrine.orm.default_entity_manager", path: "doctrine.orm.default_entity_manager -> doctrine.dbal.default_connection -> asm_translation_loader.history.subscriber -> security.context -> security.authentication.manager -> fos_user.user_provider.username_email -> fos_user.user_manager". 

and

 Circular reference detected for service "doctrine.orm.default_entity_manager", path: "routing.loader -> assetic.asset_manager -> twig -> twig.extension.render_module -> doctrine.orm.default_entity_manager -> doctrine.dbal.default_connection -> asm_translation_loader.history.subscriber -> security.context -> security.authentication.manager -> fos_user.user_provider.username_email -> fos_user.user_manager".

My config.yml looks like this:

asm_translation_loader:
    resources:
        pl: ~
        en: ~
    driver: orm
    history: false # default false
    database:
        entity_manager: doctrine.orm.default_entity_manager

Right now have no more time to debug it. Bu on the weekend i will be able to look at this little more.

My first shoot is that the FOSUserBundle making some trouble here.

Kind regards! Max

xabbuh commented 10 years ago

Actually, I can't reproduce your issue. Can you provide further details?

maschmann commented 10 years ago

I think the problem might be your entity manager - by default the default_entity_manager service is used, so you don't have to configure it explicitly. But as of now I couldn't reproduce the circular reference. I'll close the issue if there's no further feedback within the next 4 days :-)

xabbuh commented 10 years ago

This might well be the same as #20.

@emgiezet If you don't use the translation history subscriber, you can switch to the latest dev version where that service won't be loaded when the feature is disabled (which is not enabled by default). We are working on a fix though.

xabbuh commented 9 years ago

@emgiezet We just released version 1.0.4. Hopefully, this fixes this issue for you too.