Open pini85 opened 10 months ago
Hi, I've also noticed this in all my AppRoute pages with <form action={ _actionFunction }> components which are navigated to from a Link component.
This doesn't inhibit invocation of the action but does remove all the hidden inputs ($ACTION_ properties). which is causing issue such as MissingCSRF: CSRF token was missing during an action.
Manually reviewing both the nextjs & React repo, I've come across these two - maybe this will help?
and
others are also experiencing this issue: https://github.com/vercel/next.js/discussions/56234
Link to the code that reproduces this issue
https://github.com/pini85/form-action-bug-next-js-14
To Reproduce
Current vs. Expected behavior
Expected the form's action attribute to be set correctly. However, the developer tools show the action attribute set to a JavaScript throw statement, indicating an unexpected handling of the form action in dynamically displayed components
Verify canary release
Provide environment information
Which area(s) are affected? (Select all that apply)
App Router
Which stage(s) are affected? (Select all that apply)
next dev (local), next build (local), next start (local), Vercel (Deployed)
Additional context
No response