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

Client side href resolving breaks with trailingSlash: true #16872

Closed
ijjk opened this issue Sep 5, 2020 · 3 comments · Fixed by #16873
Closed

Client side href resolving breaks with trailingSlash: true #16872

ijjk opened this issue Sep 5, 2020 · 3 comments · Fixed by #16873
Assignees
Milestone

Comments

@ijjk
Copy link
Member

ijjk commented Sep 5, 2020

I've /en/software.jsx and /en/[post].jsx files. When I navigated to /en/software/ via Router.push('/en/software/') in v9.5.2 it resolved to /en/software.jsx correctly. But in v9.5.3 and v9.5.4-canary.3 it resolves to /en/[post].jsx

Originally posted by @MrEfrem in #16825 (comment)


We need to make sure to resolve the href value correctly when the trailing slash is present on the client

@ijjk ijjk self-assigned this Sep 5, 2020
@ijjk ijjk added point: 2 and removed point: 1 labels Sep 5, 2020
@kodiakhq kodiakhq bot closed this as completed in #16873 Sep 6, 2020
kodiakhq bot pushed a commit that referenced this issue Sep 6, 2020
This makes sure to strip the trailing slash before attempting to resolve the `href` against pages/dynamic routes and adds tests ensuring the correct pages are resolved with `trailingSlash: true` enabled.

Fixes: #16872
@Timer Timer added this to the iteration 8 milestone Sep 6, 2020
@ijjk
Copy link
Member Author

ijjk commented Sep 7, 2020

@MrEfrem this should be resolved in the latest canary of Next.js v9.5.4-canary.4

@MrEfrem
Copy link

MrEfrem commented Sep 7, 2020

@ijjk thanks!

HitoriSensei pushed a commit to HitoriSensei/next.js that referenced this issue Sep 26, 2020
This makes sure to strip the trailing slash before attempting to resolve the `href` against pages/dynamic routes and adds tests ensuring the correct pages are resolved with `trailingSlash: true` enabled.

Fixes: vercel#16872
@balazsorban44
Copy link
Member

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.

@vercel vercel locked as resolved and limited conversation to collaborators Jan 29, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants