sonata-project / SonataMediaBundle

Symfony SonataMediaBundle
https://docs.sonata-project.org/projects/SonataMediaBundle
MIT License
449 stars 496 forks source link

"admin_sonata_media_media_create" as such route does not exist. #972

Closed saravanakumargn closed 8 years ago

saravanakumargn commented 8 years ago

Getting following Error when i tried to load the page /admin/dashboard. With out media bundle i can able to get the admin dashboard page. But when i enable media bundle i am getting error.

An exception has been thrown during the rendering of a template ("Unable to generate a URL for the named route "admin_sonata_media_media_create" as such route does not exist.") in SonataAdminBundle:Block:block_admin_list.html.twig at line

composer.json "sonata-project/admin-bundle": "2.4.x-dev", "sonata-project/doctrine-orm-admin-bundle": "2.4.x-dev", "sonata-project/classification-bundle": "2.3.x-dev", "knplabs/gaufrette": "~0.1.6" "sonata-project/media-bundle": "2.4.x-dev"

saravanakumargn commented 8 years ago

Solved by adding the following route additionally with documented one

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

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

Godfatherlolz commented 5 years ago

@saravanakumargn This does not change anything at least in my case this erros still persists.

kratekk commented 5 years ago

@Godfatherlolz Hey, did you find the solution?

hacktic commented 5 years ago

I followed the 2.3 Doc (instead of 3.*) and got it working. Its "admin" instead of "admin_area"

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

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