New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Parallel routes intercepting does not work #54636
Comments
try adding a layout.tsx in (auth) that renders props.auth |
This does not work, as it says it is not a valid layout prop in that folder. I have added a layout.tsx in the root directory which renders the authModal. As I said, I had used the same exact code in a different repo, and there everything works. It is just in this project that I am facing this issue. |
Wow, okay so this is weird
I am not sure how this was affecting the interception of the route, and would love some explanation on it, thanks! |
Temporary workaround that fixed it for me in VSCode:
Note that I have TypeScript 5.2.2 installed as a project dev dependency, as well as 5.2.2 as the VSCode version. |
"next": "13.4.19", I'm facing a slightly strange problem, I don't know if I'm missing something. I have a project that is already working normally, the dynamic routes together with route interception, everything is ok. The folder structure is as follows: link: https://portfolio-renovatt.vercel.app/views/projects But I'm trying to use hidden routes, An error occurs where the original route and the intercepted route are called together. I changed the structures a few times and found these two repositories, which I found in other issues: They are doing it like this, placing I don't understand why this happens, can anyone help me? |
I managed to fix this problem, solution: I tested several ways, and I saw that calling the |
We cannot easily recreate the issue with the provided information. Please add a minimal reproduction in order for us to be able to help more efficiently. Why was this issue marked with the
|
From my understanding, this issue is related to route groups and intercepting routes. It seems the route groups are causing the router to ignore the interception. I tried to remove the group and it worked. |
@remib18 have you found any fix for this? |
This issue has been automatically closed because it received no activity for a month and had no reproduction to investigate. If you think it was closed by accident, please leave a comment. If you are running into a similar issue, please open a new issue with a reproduction. Thank you. |
This closed issue has been automatically locked because it had no new activity for 2 weeks. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
Verify canary release
Provide environment information
Operating System: Platform: darwin Arch: arm64 Version: Darwin Kernel Version 23.0.0: Fri Aug 18 00:02:20 PDT 2023; root:xnu-10002.1.11~5/RELEASE_ARM64_T8103 Binaries: Node: 18.17.1 npm: 9.6.7 Yarn: 1.22.19 pnpm: 8.7.0 Relevant Packages: next: 13.4.20-canary.9 eslint-config-next: 13.4.19 react: 18.2.0 react-dom: 18.2.0 typescript: 5.2.2 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://github.com/shiroyasha9/teensy/tree/feature/migrate-to-next13
To Reproduce
migrate-to-next13
GOOGLE_ID
,GOOGLE_SECRET
,NEXTAUTH_SECRET
andSECRET_KEY
to test out the bug)pnpm i
followed bypnpm dev
Describe the Bug
So I followed the official tutorial provided for using parallel routes and intercepting routes together to create an experience where if the user clicks on sign in while being on a page, it opens up as a modal overlaying the previous page, otherwise when being navigated to the page directly it loads as a separate page.
The weird thing is that the same code works on a different repo, and also the nextgram example. However in this project, the route simply does not get intercepted. Below attached is the screenshot for the log that appears when navigating to it using the login button
Folder structure
I have tried the canary releases, downgrading to the version of next that was used in nextgram example, even copy pasting the nextgram example code here. But none of the routes seem to be ever intercepted. I thought the pages router might be conflicting (I am in a middle of a migration to app router), so I even tried deleting it, but to no avail.
To check the deployed version, please check this link https://teensy-3n9c0y53y-shiroyasha9.vercel.app/
Video of the current behaviour, if that helps
https://github.com/vercel/next.js/assets/48734821/17d63fcd-ada0-4500-a77c-325841ffd922
Would love some help on this topic, thanks a lot
Expected Behavior
The /login route should have been intercepted and opened as a modal, instead of going to the standalone route.
Which browser are you using? (if relevant)
Arc Version 1.5.0 (41058) Chromium Engine Version 116.0.5845.110
How are you deploying your application? (if relevant)
Vercel
The text was updated successfully, but these errors were encountered: