Next.js Discord

Discord Forum

redirect on server action not working anymore on v14.2.0

Unanswered
Barbary Lion posted this in #help-forum
Open in Discord
Barbary LionOP
I have a project using parallel and intercepting routes,
i.e /[slug]/projects and /[slug]/projects/new (modal)

1. on /[slug]/projects/new route, modal is open,
2. modal calls server action i.e createProject()
3. inside createProject() calls
redirect(`/${slug}/projects`);


on v14.1.4, redirect to /[slug]/projects as expected hence modal closes
on v14.2.0, it does not redirect and modal remains open,

2 Replies

Barbary LionOP
Barbary LionOP
moving the routing logic client side using router.push or router.replace seems to change the url to /${orgSlug}/projects which is correct, but the modal that is meant to render only on /new is still open.