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

Unable to transition to child route with mapped query parameters #13612

Closed
eguitarz opened this issue Jun 6, 2016 · 7 comments
Closed

Unable to transition to child route with mapped query parameters #13612

eguitarz opened this issue Jun 6, 2016 · 7 comments

Comments

@eguitarz
Copy link

eguitarz commented Jun 6, 2016

Ember Twiddle: https://ember-twiddle.com/165676557d943e5cfa690261c6342c4d?openFiles=twiddle.json%2C

I have a parent and a nested child route, child route is fed with a query parameter. It works fine if I don't alias query parameter in child controller, but it raises exception if I mapped the query parameter into other name.

Which gave me an exception

VM276 ember.debug.js:28535 Error while processing route: parent.index Assertion Failed: You're not allowed to have more than one controller property map to the same query param key, but both parent.child:searchQuery and parent.child:searchQuery map to q. You can fix this by mapping one of the controller properties to a different query param key via the as config option, e.g. searchQuery: { as: 'other-searchQuery' } Error: Assertion Failed: You're not allowed to have more than one controller property map to the same query param key, but both parent.child:searchQuery and parent.child:searchQuery map to q. You can fix this by mapping one of the controller properties to a different query param key via the as config option, e.g. searchQuery: { as: 'other-searchQuery' }

I have only one controller property map to query param key.

@acorncom
Copy link
Contributor

There have been regressions with query params since Ember 2.4.3 (more details here: #13600). Would you check to see if your issue is resolved by shifting back to 2.4.3 or moving to 2.4.6 as mentioned here? #13258 (comment)

A more permanent fix is in the works here: #13273

@acorncom
Copy link
Contributor

I'll close this for now, but please ask to re-open if you're running into something different

@eguitarz
Copy link
Author

eguitarz commented Jun 10, 2016

@acorncom I tried on 2.4.3 and 2.4.6, and both are not working (and same error message). Seems this bug was lurking for a while. It was not working on 2.3.2 as well. This probably not related to the regression. Do you think it worth to re-open?

@acorncom acorncom reopened this Jun 17, 2016
@cantsin
Copy link

cantsin commented Jun 20, 2016

I just ran into this issue! I'm using 2.5.1. It looks like the only fix for this is to remove (or not to use) the mapped query parameter -- is that correct?

@raytiley
Copy link
Contributor

@eguitarz Can you test against latest. I think #13273 might address this issue. /CC @rwjblue

@rwjblue
Copy link
Member

rwjblue commented Jun 27, 2016

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...

@rwjblue rwjblue closed this as completed Jun 27, 2016
@eguitarz
Copy link
Author

@raytiley I tested on canary (2.7.0-canary+8e9ec7dd), and it works! Looking forward to next release!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants