-
-
Notifications
You must be signed in to change notification settings - Fork 25
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Category link not working if two pages with the same alias is enabled #209
Comments
@aschempp can you give us a hint how we should approach this issue? Here is a short summary:
Of course when we change the alias of page ID 2 to e.g. |
That might be a bug. But that's also exactly what the route priority field is for, you should increase the priority of route no. 2 to make sure it is taken before route no. 3. |
However, I also think the setup intended by @netzarbeiter is not possible. The system cannot know whether the |
Hmm, that's what I thought. So we would need a custom controller handling the |
not sure what you would do in a custom controller? |
I'd catch that |
what if a category has the same alias as a news? |
Came upon this issue today. And more or less found a possible solution from a previous comment: The page with the news-list (and subsequently the one the category-url should route towards) requires a higher "Route priority" than the page with the news-reader (which would get routed towards otherwise). From OPs example: For the list page: For the reader page: Example links:
At least, this worked for us just now. Cheers! |
I have a similar problem, even if I use three pages where one is used for the news list, one for the news reader and one for the categories. For better understanding:
The solution mentioned in #209 (comment) does not work for me. The content of the news article is then displayed inside the list and the title, description, etc. is not set correctly, or I receive a 404 error if I disable that. |
@lbnetprofit did you set the correct priority of the pages, like in the comment mentioned above? |
Yes, I have. The news article is routed to the page for the list if I do that. |
I can confirm the problem that @lbnetprofit has. Tried with version 3.5.4. Used the exact same config, that @Songworks used (see) |
Can confirm the error. We switched to an alias for list and detail page and get a 404. In the meantime I did this via jQuery.
|
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
[1/2] PageNotFoundException
If I change the page alias of the reader page to
blog/artikel
it works.The text was updated successfully, but these errors were encountered: