Closed kminh closed 9 years ago
hi,
this should work i think. but we seem to have an issue with the base paths. can you try adding /cms/content/pages to the routing configuration to see if that is the problem? so that the routing config looks as follows:
cmf_routing:
dynamic:
persistence:
phpcr:
route_basepaths:
- /cms/routes
- /cms/content/pages
simple cms pages are route and content in one. as long as you do not need multilanguage or other ways of varying urls for the same content, or a menu structure different from the content structure, they are a good choice as they are simple to use.
That seems to make the exception disappear.
But shouldn't /cms/content/pages
be added automatically to route_basepaths
via extension?
Somewhat related to https://github.com/symfony-cmf/SimpleCmsBundle/issues/129, in appDevDebugProjectContainer.php
I see:
'cmf_routing.dynamic.persistence.phpcr.route_basepaths' => array(
0 => '/cms/routes',
1 => '/cms/content/pages',
2 => '/cms/routes',
3 => '/cms/simple',
4 => '/cms/routes',
5 => '/cms/content/pages'
),
if I add /cms/content/pages
as you suggested.
good, so at least it works. i guess we really need to revisit this in the RoutingBundle. i created https://github.com/symfony-cmf/RoutingBundle/issues/290 - if you have time to help us there, that would be great! if not i will try to find some time to look into this.
Hi,
I have the following configuration:
and I also use a compiler pass to change the admin class of SimpleCmsBundle's page:
When I try to create a new Page, I get this error message: Can not determine the prefix. Either this is a new, unpersisted document or the listener that calls setPrefix is not set up correctly. which comes from https://github.com/symfony-cmf/RoutingExtraBundle/blob/master/Document/Route.php#L231
setPrefix
was never called I suppose. Any ideas?Thanks.