-
Notifications
You must be signed in to change notification settings - Fork 27.5k
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
13.3.0 Intercepting with grouped app does not work #48104
Comments
I had to look over the e2e tests in nextjs to find out that you need |
Running into the same problem. Sometimes it seems to sort of half work the first time, but otherwise, it's broken with route groups. |
Same here. Also, it would be lovely to configure that an interception happens on all routes of a specific group, as currently you would have to duplicate the interception path across all routes where we want interception to happen: #48157 |
same. ah, guess it's a grouped routes issue, not dynamic route issue.but repro here: /~https://github.com/amlcodes/amlcodes-nextgram-intercepting-dynamic-routes-issue |
looking! |
should be fixed by #48276 |
You the man @feedthejim ! |
@feedthejim :( I don't think the fix addresses interception w/ modal.
|
@khuezy can you open a repro with the latest canary? |
@feedthejim I think I have the same issue where intercepting routes is not working inside of a group folder (using 13.3.1-canary.6) I built a small reproduction here: https://codesandbox.io/p/sandbox/nextjs-intercepting-routes-s9j6mo I have a REAL group dashboard (using a Testing the fake one, the modal content is loaded as expected, when you go to the real one, next will always navigate away. Hope this helps you track down the issue :) --- edit --- |
@Nickman87 thanks for putting up the reproduction demo. @feedthejim the sandbox above is the same setup I want to use but currently doesn't work. |
@Nickman87 I looked at the repo and it seems that there's a bit of a misunderstanding: route groups are not part of the URL, so in the "real" route group, you're wrongly routing to the If you change it, it will fix it. Is that what you intended? |
Hi @feedthejim, This is exactly what I am trying to demonstrate, so it is intentional. If I put the exact same code inside of a real path folder, then it works, but if I use the |
@feedthejim can you look at: https://codesandbox.io/p/sandbox/nostalgic-chaplygin-tfyi0p Append "/photos" to the site url, eg: "csb.app/photos". Clicking on the "Go to /photos/[author]/[id]" will navigate to the page, I expect it to intercept. Edit: 1 second please, I have typo in the sub folder. |
Yes, that's what I was saying to you in the previous comment. You are linking to a URL that links to |
thanks for the repro @khuezy I can confirm it does not work as expected, let me investigate |
@feedthejim You are right, I did make a mistake there, my bad :). I think the issue is identical as in @khuezy's setup, only his is maybe easier to follow 😅 but I tried to rebuild the structure I have to reproduct it :) |
ohhhh okay I know what the issue is! |
Would it be possible to make |
Opened a PR for the route group support! @khuezy no because that would disable the interception route! checkout the doc for both concepts https://beta.nextjs.org/docs/routing/parallel-routes |
Gotcha, thanks for the quick turnaround! |
you're the goat @feedthejim |
fixes #48104 This PR fixes route groups breaking interception routes. I hadn't realised that route groups were actually part of the tree router, so we were not stripping them out in the interception matcher. Fixed now. <!-- Thanks for opening a PR! Your contribution is much appreciated. To make sure your PR is handled as smoothly as possible we request that you follow the checklist sections below. Choose the right checklist for the change(s) that you're making: ## For Contributors ### Improving Documentation or adding/fixing Examples - The "examples guidelines" are followed from our contributing doc /~https://github.com/vercel/next.js/blob/canary/contributing/examples/adding-examples.md - Make sure the linting passes by running `pnpm build && pnpm lint`. See /~https://github.com/vercel/next.js/blob/canary/contributing/repository/linting.md ### Fixing a bug - Related issues linked using `fixes #number` - Tests added. See: /~https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs - Errors have a helpful link attached, see /~https://github.com/vercel/next.js/blob/canary/contributing.md ### Adding a feature - Implements an existing feature request or RFC. Make sure the feature request has been accepted for implementation before opening a PR. (A discussion must be opened, see /~https://github.com/vercel/next.js/discussions/new?category=ideas) - Related issues/discussions are linked using `fixes #number` - e2e tests added (/~https://github.com/vercel/next.js/blob/canary/contributing/core/testing.md#writing-tests-for-nextjs - Documentation added - Telemetry added. In case of a feature if it's used or not. - Errors have a helpful link attached, see /~https://github.com/vercel/next.js/blob/canary/contributing.md ## For Maintainers - Minimal description (aim for explaining to someone not on the team to understand the PR) - When linking to a Slack thread, you might want to share details of the conclusion - Link both the Linear (Fixes NEXT-xxx) and the GitHub issues - Add review comments if necessary to explain to the reviewer the logic behind a change ### What? ### Why? ### How? Closes NEXT- Fixes # -->
Hey @feedthejim, I was trying to apply that in my Nextgram demo from a different issue and it does not work. Could you please take a look? I took the working example and broke it by putting the 2 routes |
On a related note, I am having issues getting intercept to work when there are multiple nested dynamic slugs . |
I have exact the same issue on 13.4.1,
|
@feedthejim Can you take a look at this ticket again please. Or should I open another ticket? As others have mentioned, dynamic routes don't seem to be interception. Here's a new repro: https://codesandbox.io/p/sandbox/youthful-butterfly-l44fsy?file=%2Fapp%2F%28main%29%2Fstatic%2Fpage.tsx%3A6%2C57 The Thanks! If I click on the If I refresh the Notice the missing "(.)" |
Hello @khuezy did you able to find a solution for this? |
This closed issue has been automatically locked because it had no new activity for a month. 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 22.3.0: Mon Jan 30 20:38:37 PST 2023; root:xnu-8792.81.3~2/RELEASE_ARM64_T6000 Binaries: Node: 18.14.0 npm: 9.3.1 Yarn: 1.22.19 pnpm: 7.27.0 Relevant packages: next: 13.3.1-canary.2 eslint-config-next: N/A react: 18.2.0 react-dom: 18.2.0
Which area(s) of Next.js are affected? (leave empty if unsure)
No response
Link to the code that reproduces this issue
/~https://github.com/khuezy/next-intercept
To Reproduce
npm install
npm run dev
Go to nested
, route is stuckGo to nested
, route is interceptedDescribe the Bug
When using group routes, interception does not work.
eg:
Expected Behavior
When using grouped routes, interception should work.
Which browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
No response
The text was updated successfully, but these errors were encountered: