-
Notifications
You must be signed in to change notification settings - Fork 26.3k
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
Redirect in Server Actions does not unmount Intercepting Route Modal #52837
Comments
Bug is even worse in latest 14.0.2 as now it doesn't even preform the redirect. It causes the form to sit forever with a status of pending. |
I'm trying to do something similar with a set of intercepting pages for modals and then the corresponding 'real' routes. If I hard refresh through the non-modal cases, it works fine, but only the first modal appears (the server action redirect doesn't seem to work, although the terminal console indicates changes).
I tried various placements of This seems like it would be a great feature but every time I try use I find something I can't make work. I'm not sure if it's bugged, poorly documented, or I'm just doing it all wrong. |
Hi, I just tested the OP's reproduction on the latest |
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
Which area(s) of Next.js are affected? (leave empty if unsure)
App Router, Routing (next/router, next/navigation, next/link)
Link to the code that reproduces this issue or a replay of the bug
https://codesandbox.io/p/sandbox/laughing-leaf-vg87y5?file=%2Fapp%2F%40modal%2F%28...%29form%2Fpage.tsx%3A7%2C16
To Reproduce
Based on CodeSandbox:
Describe the Bug
What happens: Redirecting within Server Actions does not unmount intercepted route modal even though redirection takes to non intercepted / non Modal route.
After redirect there is following error in console:
Expected Behavior
After submitting the form with Server Actions inside of Intercepting Route Modal, I expect the intercepted modal to unmount after redirect non-intercepted route.
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: