0
votes

I am using jobeet's tutorial and I am following sonataAdmin. I have configured my app/config/routing.yml as follow:

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

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

I have also configured my config.yml as follow:

# app/config/config.yml
sonata_admin:
    title: Jobeet Admin
 
sonata_block:
    default_contexts: [cms]
    blocks:
        sonata.admin.block.admin_list:
            contexts:   [admin]
 
        sonata.block.service.text:
        sonata.block.service.action:
        sonata.block.service.rss:

When i am running the url http://localhost/admin/dashboard then I am getting the problem

Cannot import resource "C:/wamp/www/Symfony/app/config." from "C:/wamp/www/Symfony/app/config\routing.yml".

what should I do?

2

2 Answers

1
votes

. is not a valid resource. The resource-directive is used to import external configurations, but . points nowhere. See Including External Routing Resources for further information. I even guess, that sonata_admin is not a type too. It is usually something like xml, or annotation depending where resource points to.

0
votes

This problem may also be caused by typo in service configuration in MyBundle/Resources/config/admin.yml Wich was my case.