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

404 error not triggering when using DocumentDriven and subfolders with [...slug].vue #2625

Open
raf202 opened this issue Apr 26, 2024 · 0 comments

Comments

@raf202
Copy link

raf202 commented Apr 26, 2024

Environment


  • Operating System: Windows_NT
  • Node Version: v18.14.0
  • Nuxt Version: 3.9.3
  • CLI Version: 3.10.0
  • Nitro Version: 2.8.1
  • Package Manager: pnpm@8.14.3
  • Builder: -
  • User Config: -
  • Runtime Modules: -
  • Build Modules: -

Reproduction

  • Create a project with DocumentDriven: true
  • Create the DocumentDrivenEmpty.vue and DocumentDrivenNotFound.vue components
  • Test it on the root folder, i.e: /this-returns-404, it works
  • Create a subfolder, i.e: /blog, with a [...slug].vue
  • Navigate to any invalid path within the /blog subfolder, does not return 404.

Describe the bug

Handling 404 errors using the DocumentDriven flag is currently only working at root level documents. Any documents in subfolders with a [...slug].vue file are not working at all, it just returns the slug page. Even when handled properly on the slug page with v-if and manually renderind the NotFound component, the response is returned 200 and not 404.

Additional context

No response

Logs

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant