-
-
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.Router: rootURL gets appended multiple times #1244
Comments
I'll look into this although rootURL was not part of 0.9.8.1 that I'm aware of. |
There is definitely some kind of issue here although I'm not able to reproduce the stacking of the rootURL. I know you said that getting demo code from the current project would be hard, but if there is any way you can setup a very simple example that I can test that would be greatly appreciated. |
Fixed by #1324. |
I see this issue happening again. |
@stefanpenner See : http://pixelhandler.github.io/ember-data-extensions/blog/
Source code is in a gist -> https://gist.github.com/pixelhandler/8831498 What's new about the bug this time is that the double rootURL only happens when the route's model hook returns a promise, returning an array works as expected. However when the model is async the transition results in a double rootURL e.g. '/blog/blog/posts/archive' (archive route, w/ async) as compared to 'blog/posts' (index route, no asyc). |
This is indeed a problem in canary. I've tested between 1.4 beta and canary. The problem starts with canary. I'll take a look to see if I can find where this changed. |
@digitaltoad Which revision of 1.4 beta? |
I tested beta 5.— On Wed, Feb 5, 2014 at 9:12 PM, Jay Phelps notifications@github.com
|
…t eagerly updates it, not use href because it includes rootURL. Fixes emberjs#1244
@jayphelps I took your changes and updated the example app I shared with the fix for the link-to url, see : http://pixelhandler.github.io/ember-data-extensions/blog-fix/ looks good. |
[FEATURE ember-eager-url-update] link-to should generate the url if it eagerly updates it, not use the href because it includes rootURL. Fixes #1244
Seeing this issue again on Ember 1.7.0-beta-5 |
Yes, its back in 1.7.0 release. |
When setting up a router using
location: history
and arootURL: '/folder'
the path on initial application launch will change to something likehttp://domain.com/folder/folder/folder
(so 2 additional/folder/
's, but I have seen 5, too, already).Paths then get correctly appended to the end of the URL.
I noticed this problem first on 0.9.8.1 and it continues on 1.0pre1. When using
location: 'hash'
it works flawlessly and also when not setting arootURL
at all, but then it will override my/folder
, of course.A possible workaround is to omit the
rootURL
and prepend/folder/
to every state directly in the root state. Feels a bit hacky, though...It's very hard to extract demo-code from the project I'm currently working on but I may do so when I find some time and it's necessary for further debugging.
The text was updated successfully, but these errors were encountered: