terminal42/contao-changelanguage

Error Unable to generate route for page ID

Closed this issue · 4 comments

Changelanguage: 3.7.7
Contao: 4.13.47

Stack Trace:

Contao\CoreBundle\Exception\RouteParametersException:
Unable to generate route for page ID 174.

  at vendor/contao/core-bundle/src/Routing/PageUrlGenerator.php:110
  at Contao\CoreBundle\Routing\PageUrlGenerator->generate('page_routing_object', array('parameters' => '/'), 0)
     (vendor/symfony-cmf/routing/src/DynamicRouter.php:180)
  at Symfony\Cmf\Component\Routing\DynamicRouter->generate('page_routing_object', array('_content' => object(PageModel), 'parameters' => '/'), 0)
     (vendor/symfony-cmf/routing/src/ChainRouter.php:248)
  at Symfony\Cmf\Component\Routing\ChainRouter->generate('page_routing_object', array('_content' => object(PageModel), 'parameters' => '/'), 0)
     (vendor/contao/core-bundle/src/Resources/contao/models/PageModel.php:1415)
  at Contao\PageModel->getAbsoluteUrl('/')
     (vendor/terminal42/contao-changelanguage/src/Navigation/NavigationItem.php:173)
  at Terminal42\ChangeLanguage\Navigation\NavigationItem->getHref(object(UrlParameterBag))
     (vendor/terminal42/contao-changelanguage/src/Navigation/NavigationItem.php:185)
  at Terminal42\ChangeLanguage\Navigation\NavigationItem->getHref(object(UrlParameterBag), true)
     (vendor/terminal42/contao-changelanguage/src/FrontendModule/ChangeLanguageModule.php:157)
  at Terminal42\ChangeLanguage\FrontendModule\ChangeLanguageModule->generateTemplateArray(object(NavigationItem), object(UrlParameterBag))
     (vendor/terminal42/contao-changelanguage/src/FrontendModule/ChangeLanguageModule.php:123)
  at Terminal42\ChangeLanguage\FrontendModule\ChangeLanguageModule->compile()
     (vendor/contao/core-bundle/src/Resources/contao/modules/Module.php:214)
  at Contao\Module->generate()
     (vendor/terminal42/contao-changelanguage/src/FrontendModule/ChangeLanguageModule.php:67)
  at Terminal42\ChangeLanguage\FrontendModule\ChangeLanguageModule->generate()
     (vendor/contao/core-bundle/src/Resources/contao/library/Contao/Controller.php:442)
  at Contao\Controller::getFrontendModule(object(ModuleModel), 'header')
     (vendor/contao/core-bundle/src/Resources/contao/pages/PageRegular.php:194)
  at Contao\PageRegular->prepare(object(PageModel))
     (vendor/contao/core-bundle/src/Resources/contao/pages/PageRegular.php:61)
  at Contao\PageRegular->getResponse(object(PageModel), true)
     (vendor/contao/core-bundle/src/Resources/contao/controllers/FrontendIndex.php:320)
  at Contao\FrontendIndex->renderPage(object(PageModel))
     (vendor/symfony/http-kernel/HttpKernel.php:163)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1)
     (vendor/symfony/http-kernel/HttpKernel.php:75)
  at Symfony\Component\HttpKernel\HttpKernel->handle(object(Request), 1, true)
     (vendor/symfony/http-kernel/Kernel.php:202)
  at Symfony\Component\HttpKernel\Kernel->handle(object(Request))
     (web/preview.php:46)   
     ```

You should always provide more information and not post a stack trace largely without any further comments.

I can confirm this also affects Contao 5.3.13 with Changelanguage 3.7.7.
Happens on every page where the module is included.

You should always provide more information and not post a stack trace largely without any further comments.

This has already been discussed in Slack, the stack trace (the ticket actually) is more than enough ;) Alread on to fixing this.

Fixed in 6617862