What is “sonata.block.container.types” parameter in SonataPageBundle

穿精又带淫゛_ 提交于 2019-12-13 21:10:03

问题


I installed SonataPageBundle via composer:

    "sonata-project/page-bundle": "dev-master",

After installation and making all steps from official tutorial I encountered this error:

 [Symfony\Component\DependencyInjection\Exception\ParameterNotFoundException]                                                                                                  
 The service "sonata.page.admin.block" has a dependency on a non-existent parameter "sonata.block.container.types". Did you mean this: "sonata.page.block.container.class"? 

I did not find any information about this parameter in documentation. What and where should I configure?

Just for now, my config file looks like this:

# app/config/config.yml
sonata_block:
    default_contexts: [cms]
    context_manager: sonata.page.block.context_manager
    blocks:
        # Enable the SonataAdminBundle block
        sonata.admin.block.admin_list:
            contexts:   [admin]
        ivfhope.block.latest_news: ~
        ivfhope.block.tag_cloud: ~
        # Your other blocks


sonata_media:
    default_context: default
    db_driver: doctrine_orm

    providers:
        image:
            resizer: sonata.media.resizer.center

    contexts:
        service_category:
            providers: [sonata.media.provider.image]
            formats:
                small: { width: 78, height: 65, quality: 95 }
        default:  # the default context is mandatory
            providers:
                - sonata.media.provider.dailymotion
                - sonata.media.provider.youtube
                - sonata.media.provider.image
                - sonata.media.provider.file

            formats:
                small: { width: 100 , quality: 70}
                big:   { width: 500 , quality: 70}

    cdn:
        server:
            path: /uploads/media # http://media.sonata-project.org/

    filesystem:
        local:
            directory:  %kernel.root_dir%/../web/uploads/media
            create:     false


sonata_page:
    multisite: host
    default_template: default # template key from templates section, used as default for
    templates:
        default:  { path: '::three_columns.html.twig', name: 'default' }
        two_columns: { path: '::two_columns.html.twig', name: '2 columns layout' }

    use_streamed_response: false # set the value to false in debug mode or if the reverse proxy does not handle streamed response
    ignore_route_patterns:
        - ^(.*)admin(.*)   # ignore admin route, ie route containing 'admin'
        - ^_(.*)          # ignore symfony routes

    ignore_routes:
        - sonata_page_cache_esi
        - sonata_page_cache_ssi
        - sonata_page_js_sync_cache
        - sonata_page_js_async_cache
        - sonata_cache_esi
        - sonata_cache_ssi
        - sonata_cache_js_async
        - sonata_cache_js_sync
        - sonata_cache_apc

    ignore_uri_patterns:
        - ^/admin\/   # ignore admin route, ie route containing 'admin'

    page_defaults:
        homepage: {decorate: false} # disable decoration for homepage, key - is a page route


sonata_admin:
    templates:
        layout: '::admin_layout.html.twig'

cmf_routing:
    chain:
        routers_by_id:
            # enable the DynamicRouter with high priority to allow overwriting configured routes with content
            #cmf_routing.dynamic_router: 200
            # enable the symfony default router with a lower priority
            sonata.page.router: 150
            router.default: 100

回答1:


I think you need to update SonataBlockBundle as well.



来源:https://stackoverflow.com/questions/23034340/what-is-sonata-block-container-types-parameter-in-sonatapagebundle

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!