1
votes

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?

2
Have you created a User class that extends FOS\UserBundle\Entity\User? See step 3 in the documentation of FOSUserBundle: github.com/FriendsOfSymfony/FOSUserBundle/blob/master/Resources/…Jan-Henk
Yes, I wrote: "FOSUserBundle and my own bundle, that extends FOSUserBundle."Hast

2 Answers

2
votes

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.

5
votes

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