-
-
Notifications
You must be signed in to change notification settings - Fork 115
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
Wrong queryString when building navigation plan in aurelia-router #639
Comments
@MartyBoi thanks for filing this issue. Any chance you could help with a minimal repro? Maybe just even pseudo code |
@bigopon of course! Is this ok?
Expected behavior:
|
@MartyBoi I tried to reproduce your issue with this test 24394dd#diff-c70fb785178d11245e55f0a186031839R14 But it seems it's working fine. I think we may need your help with the route configuration here 24394dd#diff-a24a48cd3ab9454455fb132bcc4442d1R9 to better show the bug. |
I think the router should be like this:
If you now try to navigate to 'redirectPage' it will not include the query string when redirected to 'routePage?queryTest=123'. |
@davismj I think we should merge the query param from both instruction, with redirect instruction query string overriding the current instruction query string. This requires deserializing/serializing query string of both instructions. Thoughts? We have existing tests verifying that redirect should get the query string from current instruction, so it makes this complicated. |
@bigopon Any progress on this? Do you want me to create a pull request for this and merge the query params from both instruction? |
@bigopon I think something like this should keep your existing tests intact and fix the issue I'm having. Could you please try this?
|
I haven't. Am I correct to say that the issue is you're redirecting from page a to page b and the query string from page a is lost on page b? That sounds like a bug. If someone could help me get started by creating a PR for a failing test, that would really help me jump in and fix this. |
Anyone have workaround for this? |
I'm submitting a bug report
1.7.1
Please tell us about your environment:
Operating System:
Windows 10
Node Version:
10.15.1
NPM Version:
6.4.1
JSPM OR Webpack AND Version
webpack 4.29.6
Browser:
all
Language:
TypeScript
Current behavior:
Not redirected with correct query parameter. We are using aurelia-open-id-connect and when redirected back from our identity provider the query parameters are removed when creating the redirectPlan in aurelia-router, navigation-plan.ts.
In my example you can see that the path we're navigating to is "/example?test=123". But in the end the query string is removed because the wrong instruction is used when getting query params.
Instead of getting queryString from instruction like this:
I think you should get it from redirectInstruction like this:
The text was updated successfully, but these errors were encountered: