Skip to content
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

renderTemplate behavior changed? #10478

Closed
nullrocket opened this issue Feb 17, 2015 · 7 comments · Fixed by #10683
Closed

renderTemplate behavior changed? #10478

nullrocket opened this issue Feb 17, 2015 · 7 comments · Fixed by #10683
Milestone

Comments

@nullrocket
Copy link

Prior to the latest canary 1.12.0-beta.1+canary.f5873415 you could render common outlets on a parent routes renderTemplate and they would persist, now it seems like only the first call to render works.

This is the behavior a couple days ago, not sure of exact day. (using v1.91 but behavior the same on canary up til then)
http://emberjs.jsbin.com/gixiva/2/edit

This is the behavior now.
http://jsbin.com/fuzome/edit

Notice the "common" template isn't rendered in the latest.

@fivetanley
Copy link
Member

cc @ef4

@ef4
Copy link
Contributor

ef4 commented Feb 17, 2015

Thanks for the bug report. It looks to me like it's triggered by having only non-default renders, and no "main" render.

Here's a variation on your example that works, just by using a non-named outlet at the top:

http://jsbin.com/wuzufefira/1/edit?html,css,js,output

I will investigate further.

@nullrocket
Copy link
Author

Thanks, that does fix things for me, easy enough to change if having a default outlet is a requirement.

I have had the same structure in our app for over a year so it may need to make it into documentation or the change log on beta somewhere, or..... maybe not, since I don't see anyone else saying they are borked.

@ef4
Copy link
Contributor

ef4 commented Feb 17, 2015

I think it's still a bug, and should just get fixed instead of documented.

@Leeft
Copy link

Leeft commented Feb 20, 2015

since I don't see anyone else saying they are borked.

It affects my application as well. Adding the plain outlet fixes some but not all of the errors.

@nullrocket
Copy link
Author

Another issue I think may be related. Templates with the name "main" will not render. Hooks like didInsertElement run but the output is empty. I am not sure if this is related, but it showed up at the same time as the other issue.

@ghost
Copy link

ghost commented Feb 27, 2015

since I don't see anyone else saying they are borked

Happening to our application as well with 1.11.0-beta.3.

@rwjblue rwjblue added this to the 1.11.0 milestone Mar 9, 2015
ef4 added a commit to ef4/ember.js that referenced this issue Mar 20, 2015
Closes emberjs#10478 by changing the way we account for routes that don't do a
default `render()`.

Fixes issue in comments of emberjs#10606 to make us tolerant of multiple renders on top of each other.

Close emberjs#10658 by respecting a non-default template rendered into a
main outlet as our own template.

Close emberjs#10606 by running disconnectOutlet against all active routes, not
just the current one. (*shudder*)
ef4 added a commit that referenced this issue Mar 26, 2015
Closes #10478 by changing the way we account for routes that don't do a
default `render()`.

Fixes issue in comments of #10606 to make us tolerant of multiple renders on top of each other.

Close #10658 by respecting a non-default template rendered into a
main outlet as our own template.

Close #10606 by running disconnectOutlet against all active routes, not
just the current one. (*shudder*)

(cherry picked from commit a994491)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants