Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
250 views
in Technique[技术] by (71.8m points)

symfony - What is "sonata.block.container.types" parameter in SonataPageBundle

I installed SonataPageBundle via composer:

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

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

 [SymfonyComponentDependencyInjectionExceptionParameterNotFoundException]                                                                                                  
 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
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

I think you need to update SonataBlockBundle as well.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...