-
Notifications
You must be signed in to change notification settings - Fork 29.9k
Description
Link to the code that reproduces this issue
https://github.com/azvyae/next-14-repro-bug
To Reproduce
npm run buildnpm start- Navigate to
/parallelroute - Compare it to
/non-parallelroute
Current vs. Expected behavior
Problems
Metadata (especially) title not working properly when defined inside page.tsx/layout.tsx inside the parallel route folder (the folder with "@" in it), those problems are:
-
It won't respects the title template defined inside the root layout metadata
-
Even though the UI rendered for each of them, the title is won't changed
-
Currently, the metadata used would be the latest folder ordered by alphabet of the
/@folder/page.tsxfile if there are parallel routes implemented.
Expected/Solution
-
It should respect the title template defined in the root layout/parent layout
-
Because it would be confusing if we render two route at once (because its capability to render this way by parallel routes), would be possible if we render based on shown inside the layout logic? Like
role_adminshould render@adminotherwise@guest, because this only make the route rendered once, it should show one metadata only.
Verify canary release
- I verified that the issue exists in the latest Next.js canary release
Provide environment information
Operating System:
Platform: linux
Arch: x64
Version: #1 SMP PREEMPT_DYNAMIC Tue Nov 28 19:11:52 UTC 2023
Binaries:
Node: 20.9.0
npm: 10.1.0
Yarn: N/A
pnpm: 8.11.0
Relevant Packages:
next: 14.0.4-canary.43
eslint-config-next: 14.0.4-canary.43
react: 18.2.0
react-dom: 18.2.0
typescript: 5.3.2
Next.js Config:
output: N/AWhich area(s) are affected? (Select all that apply)
Metadata (metadata, generateMetadata, next/head), Routing (next/router, next/navigation, next/link)
Additional context
No response