sonata-project/SonataAdminBundle — Issue #493: Call to a member function build() on a non-object
Author: MGaetan89
Created: 2012-01-12 13:35:57+00:00
State: open

Hey,

I am trying to add a new page in my admin zone. I followed the documentation and create a service, an admin controller wich extends the Sonata default Admin and add it to the dashboard_groups options un my config file. But when I try to access *admin/dashboard* I get the following error :

```
Fatal error: Call to a member function build() on a non-object in C:\Program Files (x86)\EasyPHP\www\EmbalPlus\Web\vendor\bundles\Sonata\AdminBundle\Admin\Admin.php on line 853
```

My service is defined as follow :

```yml
services:
mysite.legals.admin:
class: MySite\LegalsBundle\Admin\LegalsAdmin
arguments: [null, MySite\LegalsBundle\Entity\Legals, MySiteLegalsBundle:LegalsController]
```

All the files are in my project ;)
Is the something I forgot to do in order to make this work ?
Thank you for your help !