-
Notifications
You must be signed in to change notification settings - Fork 27k
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
Back button for rewritten page broken in last version #25490
Comments
Apparently, the issue is a bit more complex (probably why it wasn't caught by the current integration tests), but this only breaks when the page has dynamic params (like: |
This is happening to me and we don't use |
We're experiencing the same issue using a rewrittten route with one dynamic param, along with getStaticPaths and getStaticProps. Tested with v10.2.4-canary.0. All click-based navigation works fine using only href param on Links and router.push. I tried adding the 'as' param to Links but that causes the same error message as above when links are clicked. |
Same here. The problem appears between A similar issue has been opened and fixed on Here is one sample project to reproduce the bug: I also forked and updated (with
In the meantime, you'll have to rollback to Hope it will be fixed soon :/ |
@ijjk I just tested this with my integration test and it still seems broken. (#25666 (comment)) will see if I can fix it. |
This issue has been automatically locked due to no recent activity. If you are running into a similar issue, please create a new issue with the steps to reproduce. Thank you. |
What version of Next.js are you using?
10.2.3
What version of Node.js are you using?
14
What browser are you using?
Chrome
What operating system are you using?
macOS
How are you deploying your application?
none
Describe the Bug
Pressing the back-button to a rewritten page causes this bug for us in the latest version:
Seems like
shouldResolveHref
, which was added in #25112 is nowfalse
and the router is not able to resolve thehref
anymore.Expected Behavior
Back button to work.
To Reproduce
Have a page that is served through a rewrite, go to another page through a next/link transition (only reproducible on the second transition when the page has not been built yet and you're testing it locally), go back to the previous page with the browser back button will throw this error.
The text was updated successfully, but these errors were encountered: