Clone repository click on Test Modal button to see modal is working.
Then refresh page or go to /contact route. There you see a simple form which is using server action to just console log the formData to the server. With Modal activated the server responds with status 500.
To deactivate the modal just rename app/@modal to app/.@modal
Describe the Bug
When there is no modal activated for the same route where the server action is started, the formData is logged to the server console just fine.
Expected Behavior
I like to use server actions and interception routes to have a modal with a contact form using server actions
Which browser are you using? (if relevant)
Chrome, Opera GX
How are you deploying your application? (if relevant)
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 directory (appDir: true), Routing (next/router, next/navigation, next/link)
Link to the code that reproduces this issue
https://github.com/sFritsch09/next-serveractions-with-modal
To Reproduce
Clone repository click on Test Modal button to see modal is working.
Then refresh page or go to /contact route. There you see a simple form which is using server action to just console log the formData to the server. With Modal activated the server responds with status 500.
To deactivate the modal just rename app/@modal to app/.@modal
Describe the Bug
When there is no modal activated for the same route where the server action is started, the formData is logged to the server console just fine.
Expected Behavior
I like to use server actions and interception routes to have a modal with a contact form using server actions
Which browser are you using? (if relevant)
Chrome, Opera GX
How are you deploying your application? (if relevant)
next start