-
Notifications
You must be signed in to change notification settings - Fork 27.4k
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
[9.5.3 - Rewrites] Navigating route with dynamic routes no longer work properly #16825
Comments
I also updated and all's broken now. |
Hi, you should no longer need to map the <Link href="/my-post/1?another=another">
<a>Post 1</a>
</Link> I opened a PR to ensure this is being correctly resolved when mapping manually with |
This makes sure we only pass the as value's `pathname` instead of the full value so that we don't accidentally include `query` values while resolving the rewrites. This also adds tests to ensure the rewrites are resolved with the correct query values when only providing `href` and when manually mapping them with `href` and `as` Fixes: #16825
This should be fixed in |
@ijjk I've |
I had tried this, but throw error 404 and auto reload page. |
@nghiepit can you please try |
This makes sure we only pass the as value's `pathname` instead of the full value so that we don't accidentally include `query` values while resolving the rewrites. This also adds tests to ensure the rewrites are resolved with the correct query values when only providing `href` and when manually mapping them with `href` and `as` Fixes: vercel#16825
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. |
Describe the bug
Navigating via
Link
orrouter.push
When custom the
as
path withparams
thenrouter.query.id
no longer true.Actual:
id=1?another=another
Expected:
id=1
To Reproduce
https://codesandbox.io/s/aged-sky-nzs6j?file=/pages/index.js
The text was updated successfully, but these errors were encountered: