Open azvyae opened 9 months ago
I encounter the same issue too .
Same here. Any news on this?
Edit by maintainer bot: Comment was automatically minimized because it was considered unhelpful. (If you think this was by mistake, let us know). Please only comment if it adds context to the issue. If you want to express that you have the same problem, use the upvote 👍 on the issue description or subscribe to the issue for updates. Thanks!
Also experiencing here.
Experiencing this but with route groups. I think the issue is that Next.js only evaluates metadata from routes / segments that are actually used for routing / navigation, so that doesn't include parallel routes nor route groups (any pages or layouts in the "@parallelroute" and "(groupname)" syntax, respectively).
If you define metadata in a normal, non-parallel , and non-route group layout or page (e.g. "app/category/page.tsx" as opposed to "app/@category/page.tsx") it may be evaluated correctly
Any update on this issue?
Edit by maintainer bot: Comment was automatically minimized because it was considered unhelpful. (If you think this was by mistake, let us know). Please only comment if it adds context to the issue. If you want to express that you have the same problem, use the upvote 👍 on the issue description or subscribe to the issue for updates. Thanks!
Link to the code that reproduces this issue
https://github.com/azvyae/next-14-repro-bug
To Reproduce
npm run build
npm start
/parallel
route/non-parallel
routeCurrent 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.tsx
file 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_admin
should render@admin
otherwise@guest
, because this only make the route rendered once, it should show one metadata only.Verify canary release
Provide environment information
Which area(s) are affected? (Select all that apply)
Metadata (metadata, generateMetadata, next/head), Routing (next/router, next/navigation, next/link)
Additional context
No response
NEXT-1811