Getting Error: You attempted to render into '" + into + "' but it was not found"
Running into an issue since upgrading to 1.11 regarding code that changed when using this.render from a route. I'm using the ember-modals addon which makes a call to this.render from a route with a template name and some options specifying how to render the template. The issue is that appendOrphan gets called when using this.render. It seems like appendOrphan expects a call to be made to impersonateAnOutlet which would set the wasUsed value. But it looks like impersonateAnOutlet only gets called when using the {{render}} helper.
I believe there is a duplicate issue regarding this. Can you check for us?
I've seen some other issues that are related but I didn't find anything exactly the same. Issues #10760 and #10602 seemed related to what is going on here.
I believe I've recreated the issue in a couple jsbins.
Ember 1.10: http://jsbin.com/zoxape/4/edit?html,js,output Ember 1.11: http://jsbin.com/bohoge/3/edit?html,js,output
I'm getting the same error :/
@drobannx - Can you update the JSBin for 2.0.0, and confirm this is still an issue?
@rwjblue I've made a 2.0.0 bin, and I still get the issue.
Ember 1.10.0: http://jsbin.com/zoxape/4/edit?html,js,output (working) Ember 2.0.0: http://jsbin.com/wifuquzovo/edit?html,js,output (get the error)
I can confirm that this pretty annoying bug is still here in Ember 2.3.1. With this bug still alive I can not find an easy and clean way to render things into some alternative layout (other then application.hbs)
I'm having same problem on Ember 2.3.1. I'm using pod structure for my app.
Update: Okay I've made that working with a bit of workaround. I'm calling render in mixin attached to application route (it's for showing modal content). When I tried to render same template in some custom route then I had the error. My fix was to attach the mixin to this route, so now action is not bubbling to application route where it was failing. Althought it works now I still see error in console.
+1 exactly the same bug on 2.3.0.
+1 2.4.1
Hello,
It seems this bug is almost 1y old. Since it seems it's not going to be fixed any time soon, is there any workaround ?
My use case is to render some route in an other layout than application. For example the login page, as it is rather independent wrt to the rest of the application.
This is my renderTemplate() overload code:
this.render('login', {
into: 'unauthenticated'
});
I have an unauthenticated.hbs file in the templates directory, so I think I'm not doing anything wrong.
Please advise.
Thanks
As for me I use pretty dirty warkaround: I have scrpit that conpletely removes any surrounding layout when activated. Yes, I know it's very dirty but at least it works.
I actually introduced a my-body component that is rendered inside application.hbs.
The my-body component makes use of a service to remove the layout (using {{#if}}) when required.
It seems similar to what you are doing, but sadly feels rather hacky. At least it works.
Could someone provide an example of fix?( using jsbin or something else)
Bump.
The issue is still present on 2.7 beta.
Checking in from 2.7 release.
Having this issue on 2.4.0
I have the same problem
here is my twiddle
https://ember-twiddle.com/5545ecd06bb4e876a9e16644396814aa
/show2 works with application.hbs perfect /show1 must render in newLayout.hbs (without application.hbs), doest work
For people who are wondering why this bug is still open: this bug has lingered at low priority because only a small minority of apps use into, and only a small minority of those attempt to do it at the top level, and none of the people working on those apps have stepped forward to fix it.
I would have killed into entirely at 2.0 if I could have -- it survived only because nobody had the time to properly deprecate and remove it. Instead we were able to keep it working, but there have always been rough edge cases and it was hard to keep 100% of them the same as the implementation changed. Each time we have poked this code again we break a different subset of rarely-used edge cases.
Just stop using into. It dates from a time when Ember had neither components nor services. Anything it can do can be done better with components and services.
For rendering to modals and sidebars, see https://github.com/ef4/ember-elsewhere
For trying to not show the application.hbs template sometimes: don't do that, you're abusing the meaning of application.hbs. It is literally supposed to be the template that is always present. Move your sometimes-present content into a child route below it (and remember that routes can have {path: '/' }, meaning your URL structure is unrelated to this change).
This issue is still present on 2.10.0 release!