Skip to content
This repository was archived by the owner on Sep 16, 2021. It is now read-only.

Conversation

rglss
Copy link

@rglss rglss commented Aug 26, 2014

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.

Q A
Doc fix? Yes
New docs? No
Applies to auto-routing-bundle RC1
Fixed tickets #555

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.
@dantleech
Copy link
Member

This raises a couple of issues:

  • If you have the CMF CoreBundle installed, I believe the value of this option should take its value from the RoutingBundle base path configuration. Do you have CmfCoreBundle and CmfRoutingBundle installed?
  • The parameter should be made required in the RA configuration if possible, if not a specific exception should be thrown at runtime.

@rglss
Copy link
Author

rglss commented Aug 26, 2014

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.

@dantleech
Copy link
Member

I have created issues for both of the issues I mentioned.

@wouterj should we specify the basepath in the tutorial anyway?

@dantleech
Copy link
Member

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

@lsmith77
Copy link
Member

there is a release already .. just not a stable one https://github.com/symfony-cmf/CoreBundle/releases/tag/1.2.0-RC1

@lsmith77
Copy link
Member

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.

@lsmith77
Copy link
Member

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 repository:init command.

@lsmith77
Copy link
Member

So imho it would be better to adjust the tutorial to start using CoreBundle .. what do you think @dantleech ?

@wouterj
Copy link
Member

wouterj commented Sep 8, 2014

ping

@dantleech
Copy link
Member

Actually I the original point of this issue is invalid. The default for the route path is cms/routes, I think the problem @robgloess has was that he didn't run the initializers. (I have run through this tutorial many times and never encountered this problem).

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants