Search code examples
symfonyadminsymfony-sonatasonata-admin

Empty Sonata Admin dashboard page after configuration according to docs


I have no luck with getting Sonata Admin to work.

My configuration:

#app/config/config.yml

JobeetBundle:
    resource: "@JobeetBundle/Resources/config/routing.yml"
    prefix:   /

admin:
    resource: '@SonataAdminBundle/Resources/config/routing/sonata_admin.xml'
    prefix: /admin

_sonata_admin:
    resource: .
    type: sonata_admin
    prefix: /admin

#JobeetBundle/Resources/config/services.yml

  sonata.admin.job:
    class: Marek\JobeetBundle\Admin\JobAdmin
    tags:
      - { name: sonata.admin, manager_type: orm, group: jobeet, label: job }
    arguments: [null,  Marek\JobeetBundle\Entity\Job, MarekJobeetBundle:JobAdmin]

URL: admin/dashboard

All I see is sonata project logo and title "Dashboard" on this page. Ofcourse I cleared cache. JobAdmin class extends Sonata\AdminBundle\Admin\Admin.

I have no errors, logs seems to be ok.

Could somebody give me any advice?

[EDIT]

It's still doesn't work admin/dashboard is the same, however I have access to listing etc from url's like:

/admin/marek/jobeet/job/list


Solution

  • Add the following to app/config/config.yml

    #app/config/config.yml
    dashboard_groups:
        marek_job:
          label: Jobs
          items: [sonata.admin.job]
    

    If you are still having problems try the following in your console:

    php app/console sonata:admin:explain sonata.admin.job