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

404 on a nested route whose parent layout contains an @slot #48749

Closed
1 task done
danielvanc opened this issue Apr 23, 2023 · 5 comments
Closed
1 task done

404 on a nested route whose parent layout contains an @slot #48749

danielvanc opened this issue Apr 23, 2023 · 5 comments
Labels
area: app App directory (appDir: true) bug Issue was opened via the bug report template. locked Navigation Related to Next.js linking (e.g., <Link>) and navigation.

Comments

@danielvanc
Copy link

danielvanc commented Apr 23, 2023

Verify canary release

  • I verified that the issue exists in the latest Next.js canary release

Provide environment information

Operating System:
      Platform: darwin
      Arch: x64
      Version: Darwin Kernel Version 22.4.0: Mon Mar  6 20:59:28 PST 2023; root:xnu-8796.101.5~3/RELEASE_ARM64_T6000
    Binaries:
      Node: 16.13.1
      npm: 9.6.0
      Yarn: 1.22.19
      pnpm: N/A
    Relevant packages:
      next: 13.2.4
      eslint-config-next: N/A
      react: 18.2.0
      react-dom: 18.2.0

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/danielvanc/paralel-routes-issue

To Reproduce

Either go to: https://paralel-routes-issue.vercel.app/ and skip to step 4

or follow these steps to run locally

  1. install dependences with npm
  2. run npm run dev
  3. navigate to http://localhost:3000
  4. click the link that says Click to go to SubPage
  5. verify that the content of the subPage loads
  6. Now refresh the page. It should show a 404

Describe the Bug

When navigating to the sub page, it shows fine but when you hit refresh / hard navigation, it then displays a 404 page.

Expected Behavior

When i hit refresh on the sub page, it should not show a 404 page but instead the actual page like it does when you navigate to it from the homepage via Click to go to SubPage.

Which browser are you using? (if relevant)

Chrome version 112.0.5615.137

How are you deploying your application? (if relevant)

Vercel

@danielvanc danielvanc added the bug Issue was opened via the bug report template. label Apr 23, 2023
@github-actions github-actions bot added area: app App directory (appDir: true) Navigation Related to Next.js linking (e.g., <Link>) and navigation. labels Apr 23, 2023
@danielvanc
Copy link
Author

I have since discovered #48090. While aware of adding a default.js/tsx, the current documentation isn't clear as to where you should put it in regards to nested routes / sub dirs, as specified in #48090.
In this instance, I feel it's necessary to followup up with #48090 by updating the documenation as necessary and then closing this once the documentation is updated. 👍🏼

@danielvanc
Copy link
Author

However, adding a default file doesn't work inside nested route groups (such as the below)

Screenshot 2023-04-23 at 15 11 50

@Kaycodes11
Copy link

getting 404, is there stii no solution

However, adding a default file doesn't work inside nested route groups (such as the below)

Screenshot 2023-04-23 at 15 11 50

is there still no solution to this?

@danielvanc
Copy link
Author

Thanks to the work done on this P.R, this has now been resolved, so now closing this.

@github-actions
Copy link
Contributor

This closed issue has been automatically locked because it had no new activity for a month. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area: app App directory (appDir: true) bug Issue was opened via the bug report template. locked Navigation Related to Next.js linking (e.g., <Link>) and navigation.
Projects
None yet
Development

No branches or pull requests

2 participants