-
Notifications
You must be signed in to change notification settings - Fork 478
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
Matched error when navigate using dynamic pages at same folder level #926
Comments
I'd ask you to make a repro project (either a repo or on codesanbox). |
Hi @rchl, here you have a codesanbox example. Using the If you do not use the what could be happening? Thanks for your patient wait 😄 |
If you navigate to a post from the blog or categories pages you should see the post detail through the If you remove all I've updated the codesanbox repo: https://codesandbox.io/s/suspicious-night-zbhxz?file=/pages/blog/index.vue |
I can see that result in both cases... Reloading the post page fails to show the extra detail though so I think you have a more fundamental problem. |
I mean, If you want to support server-side requests (which you should) then I think that this directory structure is not a proper solution since Vue Router won't know which route to pick based on the URL path itself. So you can make client-side navigations work but that is only half of the solution. Anyways, |
It still looks to me like server side rendering won't be able to differentiate between category and year/month/slug routes but at least it's not a nuxt-i18n issue. |
Version
nuxt-i18n: 6.15.1
nuxt: 2.14.0
Nuxt configuration
mode:
Nuxt-i18n configuration
Reproduction Link
https://codesandbox.io/s/suspicious-night-zbhxz?file=/pages/blog/index.vue
Steps to reproduce
I have two dynamic routes nested in the blog route. One of them shows the posts detail
_slug.vue
and the other shows a list of posts related to a category_category.vue
. When I access to the detail of a post from the path_category.vue
. instead of using the pathblog-name
keep using` blog-category '.Both routes use the same PostCard component, that redirects to the
_slug.vue
page:But it doesn't redirect well. It does this using the path
_category.vue
:That is my current pages:
What is Expected?
When navigating from
http://localhost:8000/blog/page/1
to detail post, should navigate tohttp://localhost:8000/blog/post-slug using
_slug.vueinstead of
_category.vue`What is actually happening?
Navigating always using
_category.vue
Note: Using NuxtLink whiteout
localePath
, works fine!The text was updated successfully, but these errors were encountered: