Skip to content

Category link not working if two pages with the same alias is enabled #209

@netzarbeiter

Description

@netzarbeiter

I have tried to use the new feature «two pages with the same alias» of Contao 4.13.
https://docs.contao.org/manual/en/layout/site-structure/configure-pages/#routing

For the list page:

Page name: Blog
Page alias: blog
Module: Newslist (Filter by categories is enabled and the redirect settings for the category target page is the list page)

For the reader page:

Page name: Blog
Page alias: blog
Require an item: is enabled
Module: Newsreader (The redirect settings for the category target page is the list page)

Following the category link on the list page results in the following errors:

[2/2] NotFoundHttpException

Symfony\Component\HttpKernel\Exception\NotFoundHttpException:
Page not found: https://www.example.com/blog/kategorie/blog-beitrag.html

  at vendor/contao/core-bundle/src/EventListener/ExceptionConverterListener.php:97
  at Contao\CoreBundle\EventListener\ExceptionConverterListener->convertToHttpException(object(PageNotFoundException), 'NotFoundHttpException')
     (vendor/contao/core-bundle/src/EventListener/ExceptionConverterListener.php:68)
  at Contao\CoreBundle\EventListener\ExceptionConverterListener->__invoke(object(ExceptionEvent), 'kernel.exception', object(TraceableEventDispatcher))
     (vendor/symfony/event-dispatcher/Debug/WrappedListener.php:117)
  at Symfony\Component\EventDispatcher\Debug\WrappedListener->__invoke(object(ExceptionEvent), 'kernel.exception', object(TraceableEventDispatcher))
     (vendor/symfony/event-dispatcher/EventDispatcher.php:230)
  at Symfony\Component\EventDispatcher\EventDispatcher->callListeners(array(object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener), object(WrappedListener)), 'kernel.exception', object(ExceptionEvent))
     (vendor/symfony/event-dispatcher/EventDispatcher.php:59)
  at Symfony\Component\EventDispatcher\EventDispatcher->dispatch(object(ExceptionEvent), 'kernel.exception')
     (vendor/symfony/event-dispatcher/Debug/TraceableEventDispatcher.php:154)
  at Symfony\Component\EventDispatcher\Debug\TraceableEventDispatcher->dispatch(object(ExceptionEvent), 'kernel.exception')
     (vendor/symfony/http-kernel/HttpKernel.php:213)
  at Symfony\Component\HttpKernel\HttpKernel->handleThrowable(object(PageNotFoundException), object(Request), 1)
     (vendor/symfony/http-kernel/HttpKernel.php:85)
  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))
     (public/index.php:44)

[1/2] PageNotFoundException

Contao\CoreBundle\Exception\PageNotFoundException:
Page not found: https://www.example.com/blog/kategorie/blog-beitrag.html

  at vendor/contao/core-bundle/src/Resources/contao/controllers/FrontendIndex.php:211
  at Contao\FrontendIndex->renderPage(object(PageModel))
     (vendor/symfony/http-kernel/HttpKernel.php:152)
  at Symfony\Component\HttpKernel\HttpKernel->handleRaw(object(Request), 1)
     (vendor/symfony/http-kernel/HttpKernel.php:74)
  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))
     (public/index.php:44)

If I change the page alias of the reader page to blog/artikel it works.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions