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

Intercepted routes do not work with beforeFiles rewrites #48745

Closed
1 task done
alvarlagerlof opened this issue Apr 23, 2023 · 2 comments
Closed
1 task done

Intercepted routes do not work with beforeFiles rewrites #48745

alvarlagerlof opened this issue Apr 23, 2023 · 2 comments
Labels
area: app App directory (appDir: true) bug Issue was opened via the bug report template.

Comments

@alvarlagerlof
Copy link

alvarlagerlof 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: arm64
      Version: Darwin Kernel Version 22.4.0: Mon Mar  6 21:01:02 PST 2023; root:xnu-8796.101.5~3/RELEASE_ARM64_T8112
    Binaries:
      Node: 16.17.1
      npm: 8.15.0
      Yarn: 1.22.19
      pnpm: 7.5.2
    Relevant packages:
      next: 13.3.1
      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), Internationalization (i18n)

Link to the code that reproduces this issue

https://github.com/alvarlagerlof/nextjs-intercepepted-routes-rewrites-repro

To Reproduce

Click on the each of the links on the start page.

Deployed demo: https://nextjs-intercepepted-routes-rewrites-repro.vercel.app/

Describe the Bug

The link to /foto/test does not open a modal using the intercepted route, while /photo/test does.

I'vet set a rewrite in beforeFiles in next.config.js to rewrite /foto/:id to /photo/:id, but it is not respected for the intercepted route, while it does work for the normal page (loading /foto/test works)

Expected Behavior

Both links open the modal using the intercepted route.

Which browser are you using? (if relevant)

No response

How are you deploying your application? (if relevant)

No response

@alvarlagerlof alvarlagerlof added the bug Issue was opened via the bug report template. label Apr 23, 2023
@github-actions github-actions bot added the area: app App directory (appDir: true) label Apr 23, 2023
@feedthejim
Copy link
Contributor

should be fixed by #49615

@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 Jun 11, 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.
Projects
None yet
Development

No branches or pull requests

3 participants