-
Notifications
You must be signed in to change notification settings - Fork 27k
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
[NEXT-1166] Modal Interception does not work for (.)[dynamic] routes #49614
Comments
I've been facing similar issue, it seems that using:
Fixes it. see here https://codesandbox.io/p/sandbox/quizzical-cloud-oj5kkw |
@abusada Thanks! That should unblock me for now. |
Looks like a duplicate of #48143. Using the (...) as a workaround only helps if your root segment is not dynamic. |
Is it really a duplicate? The title says that (...)[dynamic] does not work, but it works in latest canary. |
I'm getting errors on rsc using (...) :/ EDIT: nvm, it was due to me using a custom Link component |
Yes, any updates on this one? |
Hello, @abusada is it possible to use intercepting routes without using a folder to bind everything? I just want to display all the authors on the homepage without using |
Originaly posted in the other linked issue, but seems it better fits here:
|
I am having a similar issue, repo for testing is here: https://codesandbox.io/p/sandbox/nextjs-intercepting-routes-s9j6mo?file=%2Fpackage.json%3A17%2C29 Checked with latest canary ( |
I have the same problem, with dynamic the root folder, intercepting does not work |
### What? Paths with interception markers adjacent to dynamic segments are not correctly parsed, which leads to the path match logic failing. ### Why? `getParametrizedRoutes` checks for brackets but isn't expecting to receive an interception marker. For example, a path of `/photos/(.)[author]/[id]` results in the following regex: `/^\/photos\/\(\.\)\[author\]\/([^/]+?)(?:\/)?$/` This will not match a path of `/photos/(.)zack/1` since it retained the `[author]` brackets. `getSegmentParam` has a similar issue when getting values for path params, though we can just skip the interception markers and go straight to the params. Closes NEXT-1166, NEXT-1013 Fixes #48143 Fixes #49614 link NEXT-1013
I don't think this got completely fixed by #51526 Should I create a new Issue? |
Facing the same issue with the following structure; (v13.4.9)
And the locale param become undefined |
It might be best to open a new issue w/ the examples. |
It turns out there's already #52533 |
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.4.2-canary.4 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://codesandbox.io/p/sandbox/youthful-butterfly-l44fsy
To Reproduce
Now go back to the root and click on the "Static" link. This route doesn't use dynamic routes and the interception works as expected.
Describe the Bug
When using dynamic routes in the modal, the interception of the current route does not work.
That is, when I'm on the "/photos" page, I want a modal-ize "/photos/[author]/[id]"
Expected Behavior
When on the "/photos" page, clicking on a child route should intercept the child modal.
Which browser are you using? (if relevant)
No response
How are you deploying your application? (if relevant)
No response
NEXT-1166
The text was updated successfully, but these errors were encountered: