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 2.10 undefined route dynamic segment no longer working. #14657
Comments
I'm fairly sure you can still do this by passing undefined and implementing a custom serialize hook. The error message added here is a pretty big win for folks in general, and I'd prefer to keep it around if possible... |
@rwjblue passing undefined to the link-to helper throws this warning: |
I had also issues with: {{link-to 'projects.project.tasks' project}} this.route('projects', function() {
this.route('project', { path: ':id' }, function() {
this.route('tasks');
});
}); The Ember error told about undefined I think that it's not real fix and it deserves to be qualified as a bug. Otherwise, there was no information about changing router behavior. |
@Exelord that is unrelated to the originally described bug, and not a bug. We specifically document that the default implementation requires |
@Exelord (as a sidenote, not directly related to this issue)... I'm not sure if this is documented or not but I don't think you can use the same identifier for a dynamic segment more than once in the router. So I'd avoid using ":id", and also avoid using ":modelname_id" more than once. (e.g. if needed again maybe use ":newmodelname_id", just something different) |
@arenoir can you make an ember-twiddle reproduction of this issue, it sounds like a bug. Having a repo of the issue will help diagnose the issue and also provide the verification of the bug. |
@locks @pixelhandler |
@pixelhandler okay here is a twiddle. |
☝️ looks like a good reproduction. that label can be removed |
I'm confused as to if this is to be regarded a regression or if I should fix in application. |
This is blocking 2.10 and 2.11 for us. Happy to attempt a fix if someone can confirm this is a regression. |
Same problem for me as described by @arenoir |
Running into this same issue today 👎 |
@jakeleboeuf I was having the same issue and upgrading to 2.13.1 fixed it. Which version do you have? [EDIT] |
In case anyone runs into this issue, could possibly be this:
Note that I am importing |
Long shot here, but I ran into this issue when accidentally overriding the native
This was causing my model hook (where |
@lrdiv yeah, I think this happening with me to.
|
@brunowego Yeah that's the same error I was getting. In our case it seems that this is more of a misleading exception than an actual bug. |
@lrdiv this was also happening to me, good catch! ✌️ What I was doing was to destructure Ember and precisely override the native |
@Exelord @acorncom @alvincrespo @arenoir @asvny @bjornharrtell @brunowego @carlbennettnz @dustinfarris @jakeleboeuf @locks @lrdiv @nightsh @rwjblue @sly7-7 @tarikozket is this still an issue, perhaps we should close or create a new reproduction of this, what do you think? |
Closing for now, feel free to re-open if you can reproduce in the current release of Ember. |
This looks more like a unsupported feature than a bug but I thought I would log it.
When upgrading from 2.9.1 to 2.10 I ran into the following exception.
It was quite handy to use a optional dynamic segment on the parent route to load a default user model rather than having to load it for each individual child routes.
The text was updated successfully, but these errors were encountered: