-
Notifications
You must be signed in to change notification settings - Fork 26.7k
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
revalidatePath redirects to intercepting route #54085
Comments
I'm having the same issue. This can also be observed during a hot reload of the nextgram example app. @maxhannan have you found any workaround since opening this? |
Same problem for me. This is unfortunate because this is a common scenario where we have a form in a modal after which we close the modal, for example. next.js 14.0.1 not fixed yet |
This is affecting me too in Calling |
next.js 14.0.3 not fixed yet |
Hi, the provided reproduction is missing the source code, and nextgram does not use |
Hi @balazsorban44 I've opened a new issue with a reproduction using NextGram here: #59796 |
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 22.4.0: Mon Mar 6 21:01:02 PST 2023; root:xnu-8796.101.5~3/RELEASE_ARM64_T8112 Binaries: Node: 20.4.0 npm: 9.7.2 Yarn: N/A pnpm: N/A Relevant Packages: next: 13.4.12 eslint-config-next: 13.4.12 react: 18.2.0 react-dom: 18.2.0 typescript: 5.1.6 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://app.replay.io/recording/create-next-app--71effefe-43de-463e-b54e-4c2e3d2fa540
To Reproduce
Create a dynamic route which uses a server action to mutate data. Create a parallel, intercepting route which displays the same page in a modal and has the same ability to mutate data. When using a server action that revalidates path on the actual route, when the route is revalidated you will be redirected to intercepting route.
Describe the Bug
I have a route '/post/[id]' which also uses and intercepting parallel route to display the same page in a modal above the home page. On this page there is a like button which uses server actions to mutate the database which then calls revalidate route after the mutation is completed. On the intercepted route, this works without issue, however if I click the like button on the full route (not intercepted) when revalidatePath is called, the page redirects and the intercepting route modal is rendered over the full route (see recording). I am also using 'useOptimistic) but this bug occurs with or without the use of that hook.
Expected Behavior
revalidatePath does not redirect and show the intercepting route on top of the full route page.
Which browser are you using? (if relevant)
Chrome Version 115.0.5790.170 (Official Build) (arm64)
How are you deploying your application? (if relevant)
Vercel
The text was updated successfully, but these errors were encountered: