-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Possible Regression: Query params alias behavior changed? #12102
Comments
Can you provide a reproduction ember-twiddle / JSBin ? |
Reproduction:
|
Not sure if this is the same or something different but here is a Twiddle showing the queryParams alias doesn't work at all in 1.13.8. Maybe that's why there was no error in 1.13.8. If you have: queryParams: ['color', {perPage: 'per_page'}, {firstName: 'first_name'}], Then |
Possibly related: #11592. |
another related/duplicate issue: #11977 |
same problem. Still in 2.6 |
Thanks @raytiley. I'm going to close this for now, but I would love to land a new query params test to ensure we do not regress here in the future. Feel free to ping me if you would like help on how that might look... |
so this is fixed in beta 2.7 merged ? |
Please test to confirm, but yes that is what we believe. |
ok i will test when 2.7 released , can't upgrade coz the project with 2.6 version is close to release now. |
Maybe I'm not understanding the mapping of query parameters correctly or I have it backwards, but on 2.7 I have two routes (
And encounter this assertion regularly if
I tried changing my query parameter definitions to the following:
... and the controllers to:
But still receive:
My understanding of the guide, in particular the section on mapping a controller's property to a different query param key, was that within the controller I am aliasing a bound property to a query parameter, e.g. The suggested solution by the assertion is less than desirable since it sounds like the solution is to use two different query parameters, e.g. |
In case anyone else is still having this issue (I sure just did), here's how I fixed it. Just upgraded to 2.10.2 when this assertion came up.
Turns out, if a controller has E.g. Hope that helps others coming here from Google! |
In 1.13.8 I had the following code:
However, this started giving an error in 2.0:
Changing the route to the following solved the issue.
The text was updated successfully, but these errors were encountered: