Skip to content
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

Wrong routing with catch all route and a route localization disabled #3321

Closed
Applelo opened this issue Jan 22, 2025 · 1 comment · Fixed by #3325
Closed

Wrong routing with catch all route and a route localization disabled #3321

Applelo opened this issue Jan 22, 2025 · 1 comment · Fixed by #3325
Assignees
Labels
bug 🐛 custom route path 🔨 p3-minor-bug Priority 3: a bug in an edge case that only affects very specific usage routing

Comments

@Applelo
Copy link

Applelo commented Jan 22, 2025

Environment

Reproduction

  • Go to the reproduction
  • Click on preview link
  • Instead of going on preview.vue page, the page displayed is the catchall route

https://stackblitz.com/edit/bobbiegoede-nuxt-i18n-starter-wv4gghva?file=pages%2Fpreview.vue

Describe the bug

I have a route I need to be not localized (the prismic slicemachine route). However I have a catch all route and when I access the /preview, the router is loading the /[...slug].vue file instead.

If this behavior is normal, how to make both of my routes cohabitate ?

@Applelo Applelo changed the title Wrong routing with catch all route and a route localization disable Wrong routing with catch all route and a route localization disabled Jan 23, 2025
@BobbieGoede BobbieGoede added bug 🐛 🔨 p3-minor-bug Priority 3: a bug in an edge case that only affects very specific usage routing custom route path and removed pending triage labels Jan 23, 2025
@BobbieGoede
Copy link
Collaborator

Thank you for reporting!

Looks like this is caused by the module eagerly trying resolve a localized route, which combined with the prefix strategy fails to match against unlocalized routes. I have some ideas on how to fix this (hopefully soon).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 custom route path 🔨 p3-minor-bug Priority 3: a bug in an edge case that only affects very specific usage routing
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants