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

NotFound page not using RootLayout #52960

Closed
1 task done
leandrofaria opened this issue Jul 20, 2023 · 2 comments
Closed
1 task done

NotFound page not using RootLayout #52960

leandrofaria opened this issue Jul 20, 2023 · 2 comments
Labels
bug Issue was opened via the bug report template. locked

Comments

@leandrofaria
Copy link

Verify canary release

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

Provide environment information

Operating System:
      Platform: win32
      Arch: x64
      Version: Windows 10 Home Single Language
    Binaries:
      Node: 18.16.0
      npm: N/A
      Yarn: N/A
      pnpm: N/A
    Relevant Packages:
      next: 13.4.11-canary.0
      eslint-config-next: N/A
      react: 18.2.0
      react-dom: 18.2.0
      typescript: N/A
    Next.js Config:
      output: N/A

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

App Router

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

https://github.com/leandrofaria/bug-report

To Reproduce

  1. create a project using create-next-app (i've tried all combinations regarding the options)
  2. edit the page.js file to show 'main page'
  3. edit the layout.js file to show 'header' {children} 'footer'
  4. create the not-found.js file with the text 'not found'
  5. run it with npm run dev
  6. access localhost:3000 and see that the site says 'header main page footer'
  7. access localhost:3000/anything and see that the site only says 'not found', instead of 'header not found footer' as expected

Describe the Bug

The NotFound file (as well as Error and GlobalError) is not using the RootLayout as a base to be constructed.

Expected Behavior

NotFound should use the RootLayout, to make sure header, footer and other websites elements defined in such layout are shown correctly.

Which browser are you using? (if relevant)

Mozilla Firefox

How are you deploying your application? (if relevant)

npm run dev

@leandrofaria leandrofaria added the bug Issue was opened via the bug report template. label Jul 20, 2023
@huozhi
Copy link
Member

huozhi commented Jul 20, 2023

Fixed by #52790

@huozhi huozhi closed this as completed Jul 20, 2023
@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 Aug 16, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Issue was opened via the bug report template. locked
Projects
None yet
Development

No branches or pull requests

2 participants