Hash is removed when linking from app router to pages router #56212
Labels
bug
Issue was opened via the bug report template.
locked
Navigation
Related to Next.js linking (e.g., <Link>) and navigation.
Link to the code that reproduces this issue
https://github.com/blurrah/nextjs-app-page-router-hash-issue-reproduction
To Reproduce
Current vs. Expected behavior
Following the steps from the previous section I expect the hash in the link to be available, but it's being removed when switching from the app router to the pages router. It does however keep the hash when switching from pages router to the app router.
Verify canary release
Provide environment information
Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 22.5.0: Thu Jun 8 22:22:20 PDT 2023; root:xnu-8796.121.3~7/RELEASE_ARM64_T6000 Binaries: Node: 20.5.1 npm: 9.8.0 Yarn: 1.22.19 pnpm: 8.5.0 Relevant Packages: next: 13.5.4-canary.7 eslint-config-next: N/A react: 18.2.0 react-dom: 18.2.0 typescript: 5.1.3 Next.js Config: output: N/A
Which area(s) are affected? (Select all that apply)
App Router, Routing (next/router, next/navigation, next/link)
Additional context
I see this happening on a production site running 13.4.12 and on the latest canary.
The text was updated successfully, but these errors were encountered: