Closed barduck007 closed 11 years ago
I guess the exception is not enough M
try {
$menu->addChild(
$this->trans('view_page'),
array('uri' => $this->getRouteGenerator()->generate('page_slug', array('path' => $this->getSubject()->getUrl())))
);
} catch (RouteNotFoundException $e) {
// avoid crashing the admin if the route is not setup correctly
// throw $e;
}
Can you provide the exception type ?
Hello @rande and thanks for your quick response !
The exception type is Runtime exception.
It's throwed by the function "\Sonata\PageBundle\Route\CmsPageRouter::generateFromPageSlug()".
Thanks again for your help!
Regards
@barduck007 can you create a PR to change RouteNotFoundException => Exception ? thanks
@rande I did the PR. Can you check if it's ok for you?
Thanks for your help.
merged
I have a problem in the admin interface when I try to go on the Edit Page of a transversal page that I have created. Indeed, the following exception appears: An exception has been thrown during the rendering of a template ("Please provide a
path
parameters") in "SonataAdminBundle:CRUD:edit.html.twig".I found that the problem is in the function "Sonata\PageBundle\Admin\PageAdmin::configureSideMenu()" at the line 249, when the process try to get the URL of the transversal page. At this moment, my page doesn't have an URL setted.
Can you help me to understand what the problem is?
Thanks !