我差不多完成了在Symfony CMF中安装大部分Sonata软件包的工作。目前。我的最后一步是完成Sonata PageBundle。我安装了所有需要的依赖项和所需的bundle,我使用本手册(http://sonata-project.org/bundles/page/master/doc/reference/installation.html)从app / config更改了几个配置或路由文件。
问题出现在我想要做的最后一次'步骤;
php app/console sonata:easy-extends:generate SonataPageBundle
我收到此错误:
{ParameterNotFoundException:服务" sonata.page.admin.block"依赖于不存在的参数" sonata.block.container.types"。你的意思是:" sonata.page.block.container.class"?}
好的,显然缺少一个依赖参数,但我无法确定确切的问题。
我的 sonata_page &来自app / config / config.php的 sonata_block ;
sonata_page:
multisite: host
use_streamed_response: true # 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
default_template: default # template key from templates section, used as default for pages
templates:
default: { path: 'SonataPageBundle::layout.html.twig', name: 'default' }
2columns: { path: 'SonataPageBundle::2columns_layout.html.twig', name: '2 columns layout' }
# manage the http errors
catch_exceptions:
not_found: [404] # render 404 page with "not_found" key (name generated: _page_internal_error_{key})
fatal: [500] # so you can use the same page for different http errors or specify specific page for each error
sonata_block:
# context_manager: sonata.page.block.context_manager
default_contexts: [cms]
blocks:
sonata.admin.block.admin_list:
contexts: [admin]
#sonata.admin_doctrine_orm.block.audit:
# contexts: [admin]
sonata.block.service.text:
sonata.block.service.rss:
sonata.page.block.container:
sonata.page.block.children_pages:
有一个类似的问题here on SO,但是在4个月内没有回复,Google在此问题上没有任何信息(我能够找到)。
如果有人可以指出出了什么问题以及在哪里,我很乐意听到它......
答案 0 :(得分:0)
CMF项目尚未支持SonataPageBundle。所以我猜“symfony-cmf”标签是不正确的?