Kunstmaan / KunstmaanMenuBundle

[READ-ONLY] Subtree split of the Kunstmaan MenuBundle -- master at Kunstmaan/KunstmaanBundlesCMS
https://bundles.kunstmaan.be
MIT License
3 stars 0 forks source link

None of the chained routers were able to generate route: Route 'kunstmaanmenubundle_admin_menu' not found #1

Closed Perni1984 closed 9 years ago

Perni1984 commented 9 years ago

I would like to use the KunstmaanMenuBundle with the latest KunstmaanCMSBundles for a Symfony2 website project. First of all - thanks for sharing your bundles - it makes setting up our own CMS really very easy!

As our website needs more than one menu I followed the documentation to put the following parameters in config.yml

kunstmaan_menu:
    menus: [footer, secondary_top]

After that I received an error "There is no extension able to load the configuration for "kunstmaan_menu". I fixed this by adding Kunstmaan\MenuBundle\KunstmaanMenuBundle() in my AppKernel.php in the registerBundles() function.

The problem is, when I want to load a page now, I receive an Twig_runtime_error as follows:

CRITICAL - Uncaught PHP Exception Twig_Error_Runtime: "An exception has been thrown during the rendering of a template ("None of the chained routers were able to generate route: Route 'kunstmaanmenubundle_admin_menu' not found") in "KunstmaanAdminBundle:Default:app_header.html.twig" at line 65." 

Could you eventually shed some light on how to configure the KunstmaanMenuBundle correctly with the KunstmaanAdminBundle.

Kindly note that I also used your kuma:generate:article to generate a blog section for the website that generated a BlogMenuAdaptor in the MyProject\Helper\Menu namespace. Eventually this problem has something to do with it?

Perni1984 commented 9 years ago

Ok, I realised I can fix the error by telling my app to load the routing configuration of the KunstmaanMenuBundle.

I just put the following lines in my routing.yml:

# KunstmaanMenuBundle
KunstmaanMenuBundle:
    resource: "@KunstmaanMenuBundle/Resources/config/routing.yml"