Template rendering exception ("The block type sonata.Admin.block.admin_list does not exist")

Hi I am new to Symfony2 and encounter this problem when creating my admin panel.

An exception occurred while rendering the template ("The block type sonata.Admin.block.admin_list does not exist") in the SonataAdminBundle: Core: dashboard.html.twig on line 35

Someone can guide me, I will be grateful. I follow this documentation of the Sonata Admin Bundle.

+2
source share
2 answers

You must specify all the blocks in app / config / config.yml:

sonata_block:
    default_contexts: [cms]
    blocks:
        sonata.user.block.menu:
        sonata.user.block.account:
        sonata.admin.block.admin_list:
            contexts:   [admin]
+3
source

config.yml, . SonataAdminBundle: Core: dashboard.html.twig 35, . . , CRUD , .

0

Source: https://habr.com/ru/post/1544276/


All Articles