-
Notifications
You must be signed in to change notification settings - Fork 27.2k
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
Nested dynamic route segment doesn't redirect to root not-found.js #48609
Comments
I'm having a similar issue. My app structure goes something like this
And I also have a
In this scenario, when |
I'm having similar issue. My folder structure looks like this: If I place |
Same here, tried to put it in various places, also put Also it's missing the layout of the same dir level |
Did anyone come up with something to make it work? |
Same error next 14.1.0 |
Verify canary release
Provide environment information
Operating System: Platform: linux Arch: x64 Version: #1 SMP Wed Aug 25 23:20:18 UTC 2021 Binaries: Node: 18.14.2 npm: 9.6.4 Yarn: 1.22.19 pnpm: N/A Relevant packages: next: 13.3.0 eslint-config-next: 13.3.0 react: 18.2.0 react-dom: 18.2.0
Which area(s) of Next.js are affected? (leave empty if unsure)
App directory (appDir: true)
Link to the code that reproduces this issue
n/a
To Reproduce
Using the app directory, create several folders for path segments with the last ending in a dynamic route. Here is my example:
app/(site)/memberships/benefits/[slug]/page.js
I have several other similar to this
Describe the Bug
When a dynamic path is nested within another folder path, the
notFound()
function does not redirect to the/not-found.js
page. It instead throws an error. All other paths work fine. This is true whether the nested dynamic route is[slug]
or[...slug]
Expected Behavior
I expect that the
notFound()
function should redirect to thenot-found.js
page like the other dynamic routes in this same project do.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: