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

navigating to and from global not-found.js do not work in next v13.3 #48111

Closed
1 task done
Fredkiss3 opened this issue Apr 7, 2023 · 3 comments
Closed
1 task done
Labels
area: app App directory (appDir: true) bug Issue was opened via the bug report template. Navigation Related to Next.js linking (e.g., <Link>) and navigation.

Comments

@Fredkiss3
Copy link
Contributor

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: Ubuntu 20.04.0 LTS Sat Apr 08 2023 00:07:37 GMT+0200 (heure d’été d’Europe centrale)
    Binaries:
      Node: 16.14.2
      npm: 7.17.0
      Yarn: 1.22.19
      pnpm: 7.13.6
    Relevant packages:
      next: 13.3.1-canary.2
      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://stackblitz.com/edit/github-qh3hsn?file=app%2Flayout.tsx,app%2Fpage.tsx

To Reproduce

To test navigating to a 404 page :

  1. Run next dev
  2. Click on the link "Go to a 404 page"

To test navigating from a 404 page :

  1. Run next dev
  2. Go to a page that does not exist
  3. Click on the link "Go home"

Describe the Bug

There are 2 bugs occurring with 404 navigation :

  • When navigating a page that does not exist with the <Link> component if you have a global not-found page it will show the current page only and not even navigate, if i manually go to the nonexisting page (from the URL bar for ex) it will show me the correct page.
  • If you go to a page that does not exist and try to navigate using the <Link> component anywhere, it will update the URL in the URL bar but not show that page, it will only show the 404 page

Expected Behavior

Navigation from and to a page that does not exists when using a global not-found page should work normally.

Which browser are you using? (if relevant)

No response

How are you deploying your application? (if relevant)

No response

@Fredkiss3 Fredkiss3 added the bug Issue was opened via the bug report template. label Apr 7, 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 7, 2023
@TheEdoRan
Copy link

A few days ago I opened an issue for the same problem you described (broken navigation from 404 page links): #47862. I think the two bugs are related, and it seems that the Next team is already working to fix them!

@Fredkiss3
Copy link
Contributor Author

Ah ok then

@github-actions
Copy link
Contributor

github-actions bot commented May 9, 2023

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 May 9, 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. Navigation Related to Next.js linking (e.g., <Link>) and navigation.
Projects
None yet
Development

No branches or pull requests

2 participants