-
-
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
Error using this.replaceWith
with glob route encountered upgrading from Ember 2.0.0 to 2.3.1
#12945
Comments
Can you test canary? I believe this may be related to a bug that @asakusuma recently fixed. |
Canary fixes the However the error with |
There's a different codepath for a url param vs a route name param, which is probably why one is fixed and the other is not: https://github.com/emberjs/ember.js/blob/master/packages/ember-routing/lib/system/router.js#L328 |
Sounds like this will need to be addressed (updating labels) |
The errors occurs when you transition from a nested route to a glob route. I.E.: from What I'm seeing is that the recognizer of It then blows up at router.js#L314-L317 |
I am still seeing this on ember 2.12.0 |
I ran into this today on ember 2.14.1 No errors when using |
I would love a reproduction here. The original repro is pretty out of date (the emberobserver client). |
I ran into this, 2.16.2 Within a nested route, within an in-repo-engine, using |
Still the same bug, Ember 2.18. Any fixes on the horizon...? |
I'm seeing this error too, reproduced here @rwjblue https://ember-twiddle.com/514033b3906db5bc3193d6f5f9f543c9?openFiles=routes.application.js%2C I see this error on 3.0 + |
@allthesignals @asakusuma @betocantu93 @danidr @kategengler @martndemus @mikejerome @mmun @rwjblue @seawatts @stefanpenner is this still an issue, perhaps we should close or create a new reproduction of this, what do you think? |
@pixelhandler It is still an issue in 3.4.2. |
I'm doing some issue gardening 🌱🌿 🌷 and came upon this issue. Since it's quite old I just wanted to ask if this is still relevant? If it isn't, maybe we can close this issue? By closing some old issues we reduce the list of open issues to a more manageable set. |
this is still relevant |
even in ember 5.12? |
Yes. …Or I at least get the same error model(params: { id: string }, transition: Transition) {
if (!['day', 'week', 'month', 'year'].includes(transition?.to?.queryParams?.groupBy)) {
this.router.replaceWith({ queryParams: { groupBy: 'day' } })
}
} |
…h ember 5.12.0
@NullVoxPopuli Verified that this is still an issue with ember-source v5.12.0 in the ember-polaris-pokedex app here: johanrd/ember-polaris-pokedex@bee8a14#diff-1b1450eb409602d5c7e82920d9919702337ec00c47fb16015e30b8914c39d391R22 For info, a possible workaround seems to be to do replaceWith at a later stage, e.g. setupController |
When upgrading EmberObserver.com to Ember 2.3.1 from Ember 2.0.0, we encountered a couple of errors around handling when an model is not found via the
error
action on routes to go to a 404 page:One of the relevant lines is here: emberobserver/client@b85d31d#diff-42428fe7c69c15bef5f37cff1bd734cdR15
When it's
It appropriately goes to the desired route but errors with:
I then changed
/not-found
to 'not-found' (route name instead of a URL, on a hunch), it then errors with the following and enters the parent route:The 'not-found' route is a glob route:
Our workaround was to create another route for use in the error action that is not a glob route. This works fine both in route name
this.replaceWith('model-not-found')
and path formthis.replaceWith('/model-not-found')
.this.transitionTo('/not-found')
worksthis.transitionTo('not-found')
fails with the same error asthis.replaceWith('not-found')
I've attempted to recreate the errors here https://github.com/kategengler/recreate-replace-with-errors but was only successful for the
this.replaceWith('/not-found')
case. For the other case you can see it by pulling down https://github.com/emberobserver/client, installing as usual, changingapp/routes/addons/show.js#21
to bethis.replaceWith('not-found')
and runningember test
. It's also possible to see the error when running the app normally but that requires further local setup.The text was updated successfully, but these errors were encountered: