not-found loses context from layout on the re-occurring render #53147
Labels
bug
Issue was opened via the bug report template.
linear: next
Confirmed issue that is tracked by the Next.js team.
Verify canary release
Provide environment information
Operating System: Platform: darwin Arch: x64 Version: Darwin Kernel Version 21.6.0: Thu Jun 8 23:57:12 PDT 2023; root:xnu-8020.240.18.701.6~1/RELEASE_X86_64 Binaries: Node: 18.16.0 npm: 9.5.1 Yarn: 1.22.19 pnpm: 8.6.10 Relevant Packages: next: 13.4.13-canary.0 eslint-config-next: N/A react: 18.2.0 react-dom: 18.2.0 typescript: 5.1.6 Next.js Config: output: N/A
Which area(s) of Next.js are affected? (leave empty if unsure)
App Router
Link to the code that reproduces this issue or a replay of the bug
https://codesandbox.io/p/sandbox/elegant-joji-mxx7fn
To Reproduce
<Link />
- worksDescribe the Bug
To use next-intl you are supposed to use the
<Link />
provided bynext-intl/link
. This needs a context provided by next-intl. This is done in the root layout.tsx (app/[locale]/layout.tsx). This worked fine with version 13.4.9I tracked it down that the layout.tsx does not render on re-occurring renders - if you load the page and look at the console you can see:
On the first render the layout.tsx gets loaded perfects, on the second render the layout is skipped and therefore the context is not provided. It could be introduced by this PR #52589
Expected Behavior
The layout.tsx should be run on every render.
Which browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
No response
NEXT-1471
The text was updated successfully, but these errors were encountered: