-
-
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
transitionTo queryParams on initial render still broken #14875
Comments
the only aproach to get around this in ember 2.10 for me was the solution posted by @taras on 23 Dec 2015 in #12169 (the other solutions mentioned didn't work): let RedirectAfterDidTransition = Ember.Mixin.create({
redirectAfterDidTransition(...args) {
this.router.one('didTransition', ()=>{
this.router.transitionTo(...args);
});
}
});
export default Route.extend(RedirectAfterDidTransition, {
afterModel() {
this.redirectAfterDidTransition('index');
}
}); |
Updated jsbin to Ember 2.11. Thank you! |
+1 on this. Having same issue! |
Seeing this on 2.10.2. Here's the stacktrace:
|
I'm seeing this on 2.13. |
+1 on 2.13.3 |
I’m seeing this in 2.14.0 |
Running into the same issue on 2.15.0. |
Ember 2.16.2 still has this issue |
So this still happens on 2.18.0. Really? |
@gschulze I am seeing this on 2.18. |
I'm still experiencing this issue as well in Ember 2.18 |
@GCheung55 @akaravashkin @alvinvogelzang @bretjb @divmgl @gschulze @jemware @kbullaughey @locks @rafael-paiva @zidjian257 Just curious is this still an issue in Ember 3? |
@pixelhandler I'm still on the LTS 2.18.2 and I don't have the time now to check Ember 3... sorry |
@rafael-paiva thanks for the update :) |
I'm seeing this on 3.4.1 but I cannot reproduce it in a twiddle. I get the very same stacktrace mentioned above and I found that in the line the exception is thrown, the problem is that that |
I am using 2.18.2 and had the same error. Canceling the transition from the transition object did the trick for me. My use case was handling a error: function (error, transition) {
if (error.status === '401') {
// Do other stuff ex. localStorage.clear();
transition.abort();
this.transitionTo('index', {
queryParams: {
showLogin: true
}
});
return true;
}
} |
Here's a twiddle that shows this issue: https://ember-twiddle.com/7515eb58d0e64666b27bcb9fe9b3adfc/faba6dcc7af61662e0b201b3833571a155cd90d0?openFiles=routes.application.js%2C&route=%2F%3Fsome%3Dthing (Also posted to #17118) |
I'm seeing this in 3.10 😕 |
Duplicate of #17118 I believe. Ran into this issue and it didn't play nicely with next(function()) because it meant that components would render before the new tansition. Solution that worked for me:
So using 'run' instead of 'next' brought it in ahead of the component rendering etc. I noticed this because I was seeing extra XHR requests firing off before we had a valid site ID |
@JackEllis Why not |
@lolmaus Because it doesn't work without run / next. If I return it without the run / next we get the error this thread is about |
This is happening in 3.12 |
And 3.13 ember.js/packages/@ember/-internals/routing/lib/system/router.ts Lines 924 to 930 in 5c21471
What's happening is ember.js/packages/@ember/-internals/routing/lib/system/router.ts Lines 926 to 927 in 5c21471
|
@JackEllis I created #17118 as I debugged this error up to the point @arthur5005 showed ( This was one year ago and I haven't even got a response that confirms wether or not that piece of code is written badly by accident or if there is a reasoning behind it.
|
Hi, I ran into this same issue and fixed it using redirect instead of |
This is still occurring in ember 3.17. |
using |
Ran into this issue again on 3.20.4 Can anyone with expertise comment on my assessment? Happy to help with some direction. |
Can y'all check whether this fixes your issue? 😊 |
The problem described in #12169 still exists, so I'm filing a new ticket, as the initial ticket is already closed.
The text was updated successfully, but these errors were encountered: