Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork5.8k
fix: When alias contains parameters, append ext error#1855
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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Uh oh!
There was an error while loading.Please reload this page.
Conversation
vercelbot commentedAug 12, 2022 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
The latest updates on your projects. Learn more aboutVercel for Git ↗︎
|
codesandbox-cibot commentedAug 12, 2022 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
This pull request is automatically built and testable inCodeSandbox. To see build info of the built libraries, clickhere or the icon next to each commit SHA. Latest deployment of this branch, based on commit1c5a0cb:
|
Koooooo-7 left a comment• edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
LGTM.
In line 85, it seems a typobug.
Uh oh!
There was an error while loading.Please reload this page.
src/core/router/history/base.js Outdated
| :`${path}${ext}`; | ||
| :path.indexOf('?')===-1 | ||
| ?`${path}${ext}` | ||
| :path; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
We need to handle all URLs the same with or without the query, just like regular HTML in a browser.
For example,/path/to/folder/?foo=123 has a query, and we still need to look for/path/to/folder/README.md?foo=123, but this skips anything with a query.
In the end, we need to operate on the path separately, and always send the query with the final result.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
@trusktr, is there anything that could help push this along? I'm not that familiar with js but I am good with regular expressions. If you can provide a little more context on the issue perhaps I could put a little time into it, as fixing this would open up a lot of doors for those of us needing to federate markdown files from private repos/orgs on GitHub.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
@vergilcw sorry for late reply. I think the solution should determine the fully qualified URL (f.e.anchor.href = partialUrlString; const fullyQualifiedUrl = anchor.href) and then use anew URL object to get all the pieces and use them correctly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
I think the solution should determine the fully qualified URL (f.e.
anchor.href = partialUrlString; const fullyQualifiedUrl = anchor.href) and then use a new URL object to get all the pieces and use them correctly.
Have a chance to try this out?
sy-recordsFeb 28, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Can you clarify the difference between usingnew URL and the changes in this PR?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
See comment. Basically this still has other problems. The solution is to handle paths and queries separately
SumithChandran commentedSep 6, 2022 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
|
@SumithChandran hi, sorry for taking long. Did you find a solution? Icommented on a direction we should look at. We just need to handle all the URL parts correctly, f.e. get all the parts of the URL, do what we need with only the path part, then put everything back together properly. |
SumithChandran commentedJan 27, 2023
@trusktr , no I haven't found anything solution. |
zomgbre commentedJun 7, 2023
Any chance this will get done soon? I've actually never committed to a public repo, but this looks pretty straightforward. I'd be willing to try. |
@zomgbre willing to take a stab at it? We haven't circled back yet |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others.Learn more.
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
Uh oh!
There was an error while loading.Please reload this page.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1a32fb7 intodevelopUh oh!
There was an error while loading.Please reload this page.

Summary
As mentioned in#1854, if the URL used by the alias contains parameters, we will add the 'ext' configuration item incorrectly
What kind of change does this PR introduce?
Bugfix
For any code change,
Does this PR introduce a breaking change? (check one)
If yes, please describe the impact and migration path for existing applications:
Related issue, if any:
Fix#1854
Tested in the following browsers: