简体   繁体   中英

“The block type sonata.Admin.block.admin_list does not exist”

I am new to Symfony2 and facing this problem while generating my Admin Panel.

An exception has been occurred during the rendering of a template ("The block type sonata.Admin.block.admin_list does not exist") in SonataAdminBundle:Core:dashboard.html.twig at line 35

I am following this documentation Sonata Admin Bundle.

You have to specify all blocks in app/config/config.yml like in this answer

sonata_block:
default_contexts: [cms]
blocks:
    sonata.user.block.menu:
    sonata.user.block.account:
    sonata.block.service.text:
    sonata.admin.block.admin_list:
        contexts:   [admin]

我已经解决了这个问题你应该检查你是否在你的config.yml中有重复的sonata_block定义

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM