-
Notifications
You must be signed in to change notification settings - Fork 156
Update auto-routing.rst #556
Conversation
It appears that in RC1 of auto-routing-bundle the routes fail to generate unless the route basepath is set in the config. Exception: [Doctrine\ODM\PHPCR\Id\IdException] Property "parent" mapped as ParentDocument may not be empty in document of class "Symfony\Cmf\Bundle\RoutingAutoBundle\Model\AutoRoute" Simply adding the route basepath fixes this issue.
This raises a couple of issues:
|
Both CmfCore (1.1.0) and CmfRouting (1.2.0) bundles are installed and configured. The RB also has the base path config set as per docs. |
I have created issues for both of the issues I mentioned. @wouterj should we specify the basepath in the tutorial anyway? |
Ah, actually I think you need the most recent version of CmfCoreBundle for the path to be inferred automatically, but as yet there is no release candidate. Continued in symfony-cmf/routing-auto-bundle#128 |
there is a release already .. just not a stable one https://github.com/symfony-cmf/CoreBundle/releases/tag/1.2.0-RC1 |
ok, seems to me like we should merge this, automated setting and creation of the node is handled in other tickets. btw I guess it makes sense to put this into master, since we already have docs there. |
we now depend on CoreBundle 1.2, so the base path will always be set. if it is manually set to an empty string and error will be thrown. finally the base path node will be created when running the |
So imho it would be better to adjust the tutorial to start using CoreBundle .. what do you think @dantleech ? |
ping |
Actually I the original point of this issue is invalid. The default for the route path is But have merged the ticket for better handling the case where the parent document doesn't exist and RoutingAuto does already depend on CoreBundle 1.2, so I will close this. If anybody disagrees feel free to repopen it. |
It appears that in RC1 of auto-routing-bundle the routes fail to generate unless the route basepath is set in the config.
Exception:
[Doctrine\ODM\PHPCR\Id\IdException]
Property "parent" mapped as ParentDocument may not be empty in document of class "Symfony\Cmf\Bundle\RoutingAutoBundle\Model\AutoRoute"
Simply adding the route basepath fixes this issue.