Skip to content

Metadata function does not work as expected in intercepting routes. #71073

@sato-kazuma-kun

Description

@sato-kazuma-kun

Link to the code that reproduces this issue

https://github.com/sato-kazuma-kun/nextjs-intercepting-routes-bug

To Reproduce

  1. Start the application (bun or npm suggested).
  2. Navigate to / and press the "Login" button.
  3. Watch that the title of the document does not change.
  4. Check the code in app/@modal/(.)login/page.tsx (It exports a metadata function with a title).

Current vs. Expected behavior

Following the steps I expect the title of the page to change to "Login - Bug" but it remains same to the page prior to opening the modal.

Provide environment information

Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 11 Home Single Language
  Available memory (MB): 5990
  Available CPU cores: 8
Binaries:
  Node: 20.10.0
  npm: N/A
  Yarn: N/A
  pnpm: N/A
Relevant Packages:
  next: 14.2.4 // There is a newer version (14.2.15) available, upgrade recommended!
  eslint-config-next: 14.2.1
  react: 18.3.1
  react-dom: 18.3.1
  typescript: 5.0.4
Next.js Config:
  output: N/A

Which area(s) are affected? (Select all that apply)

Metadata, Parallel & Intercepting Routes

Which stage(s) are affected? (Select all that apply)

next dev (local), next start (local)

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    MetadataRelated to Next.js' Metadata API.Parallel & Intercepting RoutesRelated to Parallel and/or Intercepting routes.bugIssue was opened via the bug report template.locked

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions