Custom not-found.tsx not rendering
Unanswered
Chalcid wasp posted this in #help-forum
Chalcid waspOP
Structure:
Issue: Custom not-found.tsx isn't rendering when guidebook isn't found. Shows default Next.js 404 instead.
Any ideas what might be wrong?
app/(management)/guidebooks/[guidebookId]/
├─ layout.tsx - Calls notFound() when guidebook not found
├─ not-found.tsx - Custom 404 page
└─ cover/page.tsxIssue: Custom not-found.tsx isn't rendering when guidebook isn't found. Shows default Next.js 404 instead.
Any ideas what might be wrong?
7 Replies
@Chalcid wasp Structure:
app/(management)/guidebooks/[guidebookId]/
├─ layout.tsx - Calls notFound() when guidebook not found
├─ not-found.tsx - Custom 404 page
└─ cover/page.tsx
Issue: Custom not-found.tsx isn't rendering when guidebook isn't found. Shows default Next.js 404 instead.
Any ideas what might be wrong?
can you move your not-found page one layer up and check again?
Chalcid waspOP
Inside the
cover folder you say? if so, already tried that, its stills show to default 404@Chalcid wasp Inside the `cover` folder you say? if so, already tried that, its stills show to default 404
nah one layer up from the component that calls it. Also: add a page.tsx to your guidebookid-page
@Chalcid wasp solved?
Chalcid waspOP
Hey, sorry forgot to answer but couldn't fix so i just gave up on that, i will come back to it later
@Chalcid wasp Hey, sorry forgot to answer but couldn't fix so i just gave up on that, i will come back to it later
I just rebuild your project and it works fine: https://codesandbox.io/p/devbox/young-grass-vxx65n
@Chalcid wasp could you share if the reproduction works for you as well?