-
Notifications
You must be signed in to change notification settings - Fork 199
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
Implicit parameters to link-to break during animation #347
Comments
After filing the issue I discovered that
should be
But changing this doesn't solve the problem. My new routing map:
|
We have the same problem in our app, no links error without liquid-fire and random 'Cannot call shoudSupercede of undefined with liquid-fire. Do you find any solution? ( The transitions are not blocked anyway, we get the expected behaviour in the app but lot of errors in console) ember 1.11.3 Thank you |
We are experiencing the same issue. Our route file is OK. From some investigations, it seems that when transitioning to the new route, something tells Ember to compute route from the previous one, but not all data are still in place (read dynamic segments) to being able to calculate the path. The transitions works fine, but I find errors logged in the console. Here is the backtrace:
|
I figured it out. The reason was an unnecessary route name in a link-to helper which actually needed only query-params. |
I believe I know what's causing this, generally. If you have a To reproduce:
I would imagine this is liquid fire trying to keep the old template around for transitions, but it's not renderable. |
@richmolj That sounds very plausible. If your diagnosis is correct, it should be possible to workaround by making the parameter explicit instead: |
Yes, making the parameter explicit fixes the issue |
It worked for me after I removed the route name in those links where only the query params changed (within the same route):
|
I'm still experiencing this issue with |
Ah nevermind, I found the error, was a link-to helper in my old route |
I'm having what seems to be a similar issue. When I attempt to return to the It's a tricky error and I'm not quite sure where to look to debug... ember: 1.13.8 |
Holy hell, THANK YOU for figuring this out and documenting it! I NEVER would have gotten there on my own... |
Yes, this one is painful. It's not something we can easily fix (or even warn about) within liquid-fire's own code, and even if we were able to cut off all streams flowing into the old view (a nice feature I want to work on anyway), I'm not sure it would help with this case. I will need to see about making a change within Ember. |
+1 |
+1 We ran into this issue when updating to Ember 1.13. this.resource('blog', { path: ':blog_id' }, function() {
this.resource('blog.posts', { path: 'posts' }, function() {
this.resource('posts.comments', { path: ':comment-author_id/:comment-category_id/comments' }, function() {
this.resource('posts.comment', { path: ':comment_id' }, function() { The {{#link-to "blog" blog class="icon icon-blog"}}{{/link-to}} This works fine if fired from 'posts.comment', but throws the error if fired from 'posts.comments'. If I switch the template to render As @richmolj said, I think it is liquid-fire trying to keep the template for transitions by actually re-rendering it, but failing (incidentally the re-rendering seems a bit redundant to me since the HTML is already there for the user to see?). If it is useful, the error fires from |
I have slightly different case with the same error and stack trace. Routes are: this.route('home', { path: '/' }, function() {
this.route('guest', function() {
});
this.route('staff', function() {
this.route('hotel', { path: '/:hotel_id' }, function() {
});
});
});
this.route('session', function() {
}); And I'm getting the same error when I try to transition from But
Which is used for both
Ember: 2.3.0 Any pointers would be highly appreciated. |
It sounds like the same bug as above, which means you can work around it by setting all the parameters explicitly in your Look at all your link-to's in home.staff.hotel and home.staff.hotel.index. Probably one of them is expecting to use the current id implicitly, which doesn't work during animations since the link-to will need to be rendered under the "wrong" route while it's animating. |
Turns out I simply had a typo in one of nested-nested-nested component link-to's model prop (link-to is almost never visible so w/o this error thrown I haven't seen it live). Model for dynamic segment was missing, so yeah, error makes complete sense. Thanks for the help! |
@ef4 What exactly do you mean by explicitly setting all my parameters in my link-to helpers? What is implicit vs explicit? I am experiencing the same issue as above, only happens with a liquid-outlet, but to my understanding of link-to, all of them are being set explicitly:
Thank you for your time edit: I ended up removing most of all my links and now things are flowing. |
I have resolved this issue by explicit It would be nice to not have to remember to use explicit Not sure if this helps the discussion, but I noticed that I don't have to even click the |
I want to refactor link-to within ember itself to make it faster and to solve this class of problem. Right now each |
Is there any update on this? I am still getting this regularly when transitioning beyond a liquid-outlet |
The current solution is to make sure your link-tos are not relying on implicit parameters. A more complete fix will depend on people working to implement Ember RFC 95. |
I will look into helping on that. Just to note, this is happening with our wildcard route, which I cannot seem to get around this since its not a true link-to. |
I hate to harp on this when it seems like people are already working on it. Can someone demonstrate how to do what @ef4 mentions 4 posts up?
We could all individually implement some kind of |
- Ran into [this issue](ember-animation/liquid-fire#347) Closes #11
+1 for running into this and being somewhat confused for a moment. |
same same same :) |
Fixes problem wih link-to and liquid-fire. ember-animation/liquid-fire#347
Ember 3.3 and I'm still facing this issue. |
Yep, I now consider it a matter of course to go through the work of keeping explicit parameters on all my |
@ef4 Any news after the merge of the router service? Or is this waiting for router helpers and modifiers? |
+1 |
…e liquid-fire transitions may result in an error (see ember-animation/liquid-fire#347), pull-to-refresh component ignore mouse or touch move events if dragging hasn't started, upgraded ember-g-recaptcha
I have one {{liquid-outlet}} in my application.hbs
Here's my routing map:
If I go from the route "index.category.subcategory.post.index" to "info" or "kontakt" I get:
"Uncaught TypeError: Cannot read property 'shouldSupercede' of undefined".
This is happening after the transition to "info" or "kontakt" is completed. The transition got stuck, both liquid-child container (the new and the old) are visible.
From all the other routes the transition to "info" & "kontakt" is working.
I'm not sure if this is a problem with liquid-fire or with my routing but this only happens if I use {{liquid-outlet}}. With the normal {{outlet}} it works as expected.
Cheers
drlogout
EDIT:
ember 1.13.6
ember-cli: 1.13.7
liquid-fire: 0.21.0
The text was updated successfully, but these errors were encountered: