1

I have installed a SonataAdminBundle, a SonataUserBundle, FOSUserBundle and my own bundle, that extends FOSUserBundle.

mysite/admin/dashboard looks OK, but when I try to get a users list (mysite/admin/sonata/user/user/list) I get this error:

Class Application\Sonata\UserBundle\Entity\User does not exist

Why? What I have to do?

UPD:

Okay, now I figured out that problem, but now I have another one.

No route found for "GET /admin/sonata/user/user/list"

Why this rout does not exist? Where these routes should be placed and why there are none of them in basic SonataUserBundle installation?

ozahorulia
  • 9,798
  • 8
  • 48
  • 72
  • 1
    Have you created a User class that extends `FOS\UserBundle\Entity\User`? See step 3 in the documentation of FOSUserBundle: https://github.com/FriendsOfSymfony/FOSUserBundle/blob/master/Resources/doc/index.md – Jan-Henk Dec 12 '12 at 23:39
  • Yes, I wrote: "FOSUserBundle and my own bundle, that extends FOSUserBundle." – ozahorulia Dec 13 '12 at 09:07

2 Answers2

5

I have such a bad reputation, therefore I cannot add comments yet. In reply to the comment of Hast:

Clear. But what if my FOSUserBundle is extended by my own User Entiry, form type and handler? It doesn't work in this case

Thanks to Extending Sonata User Bundle and adding new fields

Add this to your config:

sonata_user:
    class:
        user: Acme\UserBundle\Entity\User
        group: Acme\UserBundle\Entity\Group
Community
  • 1
  • 1
roelleor
  • 443
  • 6
  • 11
2

Did you follow all steps in the installation chapter of the SonataUserBundle? Maybe you missed step 2.3.2 which adds the user admin routes.

Jan-Henk
  • 4,864
  • 1
  • 24
  • 38
  • Yes, I missed. Because I didn't find this guide on userbundle page at all. So I had been trying to install it manually, without any docs... Can you say where did you find this link? – ozahorulia Dec 13 '12 at 19:37
  • 1
    The documentation of the Sonata project bundles can be found on http://sonata-project.org/bundles/. – Jan-Henk Dec 13 '12 at 23:04
  • 1
    Clear. But what if my FOSUserBundle is extended by my own User Entiry, form type and handler? It doesn't work in this case. – ozahorulia Dec 14 '12 at 14:20