Closed gchokeen closed 11 years ago
wow, that was fast :-)
this is because we merged #23 this morning. you need to define that parameter. for now the easiest thing is to do it like we have in the sandbox with a %locales% parameter: https://github.com/symfony-cmf/cmf-sandbox/blob/master/app/config/config.yml#L124
@EmmanuelVella: would you mind doing a PR to update symfony-cmf-docs the sections about multilang configuration to explain that locales is now required if you have any multilang configuration?
I changed
symfony_cmf_menu:
menu_basepath: /cms/menu
document_manager_name: default
admin_class: ~
document_class: ~
content_url_generator: router
content_key: ~ # (resolves to DynamicRouter::CONTENT_KEY)
route_name: ~ # cmf routes are created by content instead of name
content_basepath: ~ # defaults to symfony_cmf_core.content_basepath
use_sonata_admin: auto # use true/false to force using / not using sonata admin
multilang:
use_sonata_admin: auto # use true/false to force using / not using sonata admin
admin_class: ~
document_class: ~
locales: []
to
symfony_cmf_menu:
menu_basepath: /cms/menu
document_manager_name: default
admin_class: ~
document_class: ~
content_url_generator: router
content_key: ~ # (resolves to DynamicRouter::CONTENT_KEY)
route_name: ~ # cmf routes are created by content instead of name
content_basepath: ~ # defaults to symfony_cmf_core.content_basepath
use_sonata_admin: auto # use true/false to force using / not using sonata admin
multilang:
use_sonata_admin: auto # use true/false to force using / not using sonata admin
admin_class: ~
document_class: ~
locales: %locales%
But now I am getting different error
ParameterNotFoundException: You have requested a non-existent parameter "locales".
Thanks for instant reply!
to use %locales% in your config.yml, you need to define it in parameters.yml. see the parameters.yml.dist of the sandbox. or if you do not use other cmf bundles than this one, just put the locales directly here, as in locales: [en, fr]
You need to define the %locales% parameter (in your parameters.yml file for example)
locales: [en, de, fr]
@dbu Sure I will prepare a PR for the docs
Thank you issue resolved, But i have one doubt I have already one parameter locale: en
. whats the difference locale and locales, should I keep both
locale: en
locales: [en]
the idea of the locales is to have multilanguage, so you could have a list of locales to use. locale is the default locale to be used if none is set from the request.
if your application is monolingual, it should be possible to remove the whole multilang section from your config and use the documents in their non-multilang version. (there are 2 classes, one for multilang and the base one)
@dbu : Great explanation thank you so much.
closing this ticket.
While I install knp-paginator-bundle few other bundles are updated. After update symfony-cmf/menu-bundle throwing me error
Update packages
Help me solve the issue