Skip to content
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

Parallel routes breaks completely after being redirected from a server action function #65411

Open
RahulKathayat opened this issue May 6, 2024 · 3 comments
Labels
bug Issue was opened via the bug report template. Parallel & Intercepting Routes Related to Parallel and/or Intercepting routes.

Comments

@RahulKathayat
Copy link

Link to the code that reproduces this issue

https://github.com/vercel/nextgram

To Reproduce

  1. Start the application in dev mode
  2. change the page.tsx file iin (.)photos/[id] folder to the below code
    import { redirect } from 'next/navigation';
    import { Modal } from './modal';

export default function PhotoModal({
params: { id: photoId },
}: {
params: { id: string };
}) {
return

{photoId}

<form action={async ()=>{
"use server";
redirect('/');
}}>
Submit

;
}

  1. Now when i click the submit button im being redirected to the homepage but the other parallel routes are not being displayed when i click them instead it just changes the url to that route and no modal pops up

Current vs. Expected behavior

i expected the modal to pop up after being redirected to the '/' route but instead it just changes the url and nothing renders

Provide environment information

Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 11 Home Single Language
  Available memory (MB): 15694
  Available CPU cores: 12
Binaries:
  Node: 20.11.1
  npm: N/A
  Yarn: N/A
  pnpm: 9.0.6
Relevant Packages:
  next: 14.3.0-canary.40 // Latest available version is detected (14.3.0-canary.40).
  eslint-config-next: N/A
  react: 18.3.1
  react-dom: 18.3.1
  typescript: 5.4.5
Next.js Config:
  output: N/A

Which area(s) are affected? (Select all that apply)

Parallel & Intercepting Routes

Which stage(s) are affected? (Select all that apply)

next dev (local), next build (local), next start (local), Vercel (Deployed)

Additional context

No response

@RahulKathayat RahulKathayat added the bug Issue was opened via the bug report template. label May 6, 2024
@github-actions github-actions bot added the Parallel & Intercepting Routes Related to Parallel and/or Intercepting routes. label May 6, 2024
@Stanislaw09
Copy link

Same here
broken on Next 14.2.1, 14.2.3
Works properly on 14.1.3

@RahulKathayat
Copy link
Author

Yes but in production im still facing the issue even after i downgraded my nextjs version to 14.1.3

@sbbu
Copy link

sbbu commented May 16, 2024

also having this issue on 14.2.1 and 14.2.3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue was opened via the bug report template. Parallel & Intercepting Routes Related to Parallel and/or Intercepting routes.
Projects
None yet
Development

No branches or pull requests

3 participants