-
-
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
Ember.Controller._calculateCacheKey() failure when routes nested #10838
Comments
@rwjblue Do you plan fix this issue? |
I've been trying to understand what this report is for about 30 minutes now, but am having trouble understanding what you're saying. Can you provide more structure around descriptions of what you're seeing, what you expect to see, and steps to reproduce that limit the code only the portions required to illustrate the issue? I think you're describing the intended behavior |
@rlivsey that would be an underlying cause of the problem (?), but is really just implementation detail @amurchick uncovered. I'm still trying to figure out what the public API bug is based on the report. |
@trek I am very accurate describe problem, ok, I will try again... When the bug occurs?When you use query parameters in nested routes. How to produce?
Whats wrong?For every Why this happens?Please, see first comment. What I am expect?I am expect value of query parameter There is any case exists, when this worked as described?Yes, when we do not use nested routes:
E.g., for every |
Basically the bug is: query params are not sticky on nested routes. The cacheKey is not being calculated correctly since nested routes have a dot in their name and @trek I've got a PR that has a failing test and fix but only for query params on controllers not for query params on routes (which is a feature that isn't enabled yet though).. Spent some time trying to figure it out but couldn't manage to and can't spend any more time on it.. I'll push it within the next hr or so |
Didn't get a chance to push the PR but I may have got it for route defined query params.. Will push it tomorrow |
JSBin
example for catch this - http://jsbin.com/zoyoqi#/potatoes/one?filter=filterValue&nextFilter=nextFilterValue_calculateCacheKey()
failure causes incorrect store/restore ofnextFilter
query parameter inEmber.Controller
- if you see on linkshref
's inJSBin
example - you will see:In other words,
nextFilter
value for route#/potatoes/one
sets same for all routes.However value of
filter
correctly works as described by http://guides.emberjs.com/v1.11.0/routing/query-params/ in sectionSTICKY QUERY PARAM VALUES
.What leads to failure?
Set breakpoint in http://builds.emberjs.com/beta/ember.debug.js in line
19744
:with condition
part === "team.tear.tear_menu_id"
and after debugger stops - execute line on which debugger stops.Result:
value
will be set toundefined
, because we are try getteam.tear.tear_menu_id
, butvalues
contains:Simplest example:
returns
undefined
.The text was updated successfully, but these errors were encountered: