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

Routes named "children" are not accessible in dev mode #53072

Closed
1 task done
stage-two opened this issue Jul 23, 2023 · 3 comments · Fixed by #54007
Closed
1 task done

Routes named "children" are not accessible in dev mode #53072

stage-two opened this issue Jul 23, 2023 · 3 comments · Fixed by #54007
Labels
linear: next Confirmed issue that is tracked by the Next.js team. locked Navigation Related to Next.js linking (e.g., <Link>) and navigation.

Comments

@stage-two
Copy link

stage-two commented Jul 23, 2023

Verify canary release

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

Provide environment information

Operating System:
      Platform: linux
      Arch: x64
      Version: #22 SMP Tue Jan 10 18:39:00 UTC 2023
    Binaries:
      Node: 16.17.0
      npm: 8.15.0
      Yarn: 1.22.19
      pnpm: 7.1.0
    Relevant Packages:
      next: 13.4.12-canary.0
      eslint-config-next: N/A
      react: 18.2.0
      react-dom: 18.2.0
      typescript: 4.9.4
    Next.js Config:
      output: N/A

Which area(s) of Next.js are affected? (leave empty if unsure)

No response

Link to the code that reproduces this issue or a replay of the bug

https://codesandbox.io/p/sandbox/spring-rgb-6f7kql

To Reproduce

  1. Create a file named "children.tsx" under the /pages dir
  2. Run next.js dev server
  3. Try to navigate to /children page in the browser

Describe the Bug

Routes having /children substring are not accessible in the dev mode.
In the provided codesandbox example routes /children and /profile/children do not work while deliberately misspelled /chiltren works just fine.

Looks like this behaviour was introduced by #52362

Expected Behavior

Pages are accessible in dev/prod mode disregarding their name.

Which browser are you using? (if relevant)

No response

How are you deploying your application? (if relevant)

No response

NEXT-1514

@stage-two stage-two added the bug Issue was opened via the bug report template. label Jul 23, 2023
@darshanjain-entrepreneur
Copy link
Contributor

Is this a problem or it is specifically done by next js team

@schlegz
Copy link

schlegz commented Jul 30, 2023

Can confirm this in my project as well.

@balazsorban44 balazsorban44 added Navigation Related to Next.js linking (e.g., <Link>) and navigation. linear: next Confirmed issue that is tracked by the Next.js team. kind: bug and removed bug Issue was opened via the bug report template. labels Aug 14, 2023
@kodiakhq kodiakhq bot closed this as completed in #54007 Aug 15, 2023
kodiakhq bot pushed a commit that referenced this issue Aug 15, 2023
`getEntryKey` had some logic to remove `children` if it was part of the entry (originally it was intended to fix an issue with parallel slots that were used in place of a page, but wasn't working as intended). However, this breaks pages that are named `children`.

Updating this again to implement what I think was the intended behavior in 4900fa2 which is to point to the correct entry when a parallel slot is used in place of a page component. 

- x-ref: #52362

Closes NEXT-1514
Fixes #53072
@github-actions
Copy link
Contributor

This closed issue has been automatically locked because it had no new activity for 2 weeks. 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 Aug 29, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
linear: next Confirmed issue that is tracked by the Next.js team. locked Navigation Related to Next.js linking (e.g., <Link>) and navigation.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants