-
Notifications
You must be signed in to change notification settings - Fork 27.8k
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
not found doesn't catch after dynamic param #48763
Comments
I am also struggeling with this problem and created a discussion to see how others have solved the problem: #48725 I think there is right now no real solution for it when you want to have a not-found page which is probably utilizing the language and based on that the layout that is shared in a [lang] folder. |
@zartinn I saved it as a component and I do both |
Newest 13.4.0 version does NOT fixed this. The PR #49095 sounded kind of promising. |
Kind of crazy that Next doesn't support localized 404 pages out of the box. Is there any ETA on a fix for this? |
13.4.4 version did not fixed that. |
We need this resolved asap too, |
Came across this same problem using the [locale] directory within the app directory. This should be tagged as important |
A possible to workaround this if you don't have any dynamic routes directly below the [lang] is to add a catch-all route (will match only if static routes don't match):
Then inside
This will then trigger the segment's |
Still not resolved?😒 Waiting for this fixing! I think it should be important, especially for i18n! |
Regarding the custom metadata for the not-found.js page, maybe I've found a workaround! here you can go: |
![]() this case isn't working.. @timneutkens @leerob we have this issue in production sites.. could we have a hint how we can solve this? |
Looking at the reproduction it seems there's a misunderstanding about how/when Calling This is definitely something we're going to add support for in the future but it's working as expected currently. Would recommend opening a discussion feature request for this change so that we can keep track of interest in the feature. |
@timneutkens, discussion created for this: #53486 |
@timneutkens Sorry, but it's still not working. I think the problem is now (next 13.4.13), when the layout is a async component. For me it looks like it's not awaited. |
@trickreich Feel free to open an issue and provide a reproduction. Please don't @ mention me with comments that are not actionable. Try reading your comment by itself, there is no context on what you're doing besides "I'm on the latest version and have a component". |
This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Verify canary release
Provide environment information
Which area(s) of Next.js are affected? (leave empty if unsure)
App directory (appDir: true)
Link to the code that reproduces this issue
https://stackblitz.com/edit/vercel-next-js-pqwxgu?file=app/[locale]/not-found.tsx
To Reproduce
Create a not-found file after a dynamic param
[locale] for example
, like this:[locale]/not-found.tsx
, visit any route like/en-US/yay
, it will show next default not found route.Describe the Bug
It shows next default not found route instead of the custom one created.
Expected Behavior
To show the not found created by the not-found file.
Which browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
No response
The text was updated successfully, but these errors were encountered: