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

[[...catchAll]] route doesn't work with parallel route #61206

Open
MathiasStrohkirch opened this issue Jan 26, 2024 · 8 comments
Open

[[...catchAll]] route doesn't work with parallel route #61206

MathiasStrohkirch opened this issue Jan 26, 2024 · 8 comments
Labels
bug Issue was opened via the bug report template. linear: next Confirmed issue that is tracked by the Next.js team.

Comments

@MathiasStrohkirch
Copy link

MathiasStrohkirch commented Jan 26, 2024

Link to the code that reproduces this issue

https://github.com/MathiasStrohkirch/nextjs-parallel-routes-catch-all-bug

To Reproduce

  1. Start app with npm run dev
  2. Go to /dashboard
  3. Click "go to /dashboard/add/1" link. This page works
  4. Refresh. 404

Current vs. Expected behavior

Current behavior:
404 error after hard navigation to /dashboard/add/1

Expected behavior:
dashboard should render the optional catchAll page and @modal should render the add/[id] page

Provide environment information

Operating System:
  Platform: linux
  Arch: x64
  Version: #1 SMP Thu Oct 5 21:02:42 UTC 2023
Binaries:
  Node: 18.17.1
  npm: 10.2.3
  Yarn: N/A
  pnpm: N/A
Relevant Packages:
  next: 14.1.1-canary.13 // Latest available version is detected (14.1.1-canary.13).
  eslint-config-next: N/A
  react: 18.2.0
  react-dom: 18.2.0
  typescript: 5.1.3
Next.js Config:
  output: N/A

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

App Router

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

next dev (local)

Additional context

I'm new to next, so please let me know if I am misunderstanding something!

NEXT-2312

@MathiasStrohkirch MathiasStrohkirch added the bug Issue was opened via the bug report template. label Jan 26, 2024
@ztanner ztanner added the linear: next Confirmed issue that is tracked by the Next.js team. label Jan 31, 2024
@MathiasStrohkirch MathiasStrohkirch changed the title [...catchAll] route doesn't work with parallel route [[...catchAll]] route doesn't work with parallel route Feb 1, 2024
@MrOxMasTer
Copy link

https://nextjs-forum.com/post/1206861195336744970 Still haven't fixed the catchAll

@MrOxMasTer
Copy link

MrOxMasTer commented Apr 26, 2024

Surprisingly, the problem with returning from the modal window was ignored altogether. The official example still doesn't work.

image

I am writing here because all the topics related to this problem have been closed and have not been resolved in any way. Maybe at least they'll notice here:

#62430

Even without [[..catchAll]] and using [...catchAll] + page.tsx, it still doesn't work. neither client-side nor server-side

@markedwards
Copy link

Currently working around this with this structure:

/layout.tsx
/page.tsx
/[...catchAll]/page.tsx

And both page files just have dummy null components, with the real code in the layout.tsx.

Would be nice to not have to do this, though.

@markedwards
Copy link

Is there any chance of this bug being fixed? This severely limits the usage of parallel routes.

@gsdev01

This comment has been minimized.

@beckerei
Copy link

beckerei commented Jun 3, 2024

https://nextjs-forum.com/post/1206861195336744970

Currently working around this with this structure:

/layout.tsx
/page.tsx
/[...catchAll]/page.tsx

And both page files just have dummy null components, with the real code in the layout.tsx.

Would be nice to not have to do this, though.

Doing it similar. This has the downside of getting a different instance of the page, because root page and the catchall page are different. In our case the suspense boundary kicks in again. Not a very pleasant experience.
We are reading search params in the page and loading data based on the params, so we can't have everything in the layout.

@joshuajaco
Copy link

We have the following folder structure.

/app/foo/@panel/[id]/page.tsx
/app/foo/@panel/default.tsx
/app/foo/[[...slug]]/page.tsx
/app/foo/layout.tsx

In 14.1.4 this works as expected:

  • /foo renders /app/foo/@panel/default.tsx and /app/foo/[[...slug]]/page.tsx
  • /foo/bar renders /app/foo/@panel/[id]/page.tsx and /app/foo/[[...slug]]/page.tsx

However in 14.2.0:

  • /foo renders /app/foo/@panel/default.tsx and /app/foo/[[...slug]]/page.tsx
  • /foo/bar results in a 404

This was a breaking change in a minor release that hasn't been fixed in almost 5 months.
What is the status of this? Will this be fixed some time in the future?
This is still blocking us from updating to 14.2.* and is extremely frustrating.

@ItsWendell
Copy link

Probably related: #71086

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. linear: next Confirmed issue that is tracked by the Next.js team.
Projects
None yet
Development

No branches or pull requests

8 participants