Template not rendering correctly in 1.10+


#1

I’ve got a template which isnt rendering correctly, seemingly go no reason (I have the exact same set up in hundreds of places this is the only one that doesnt work).

heres the template {{#if model}} yes {{else}} no {{/if}} help?

but all thats rendered is the word “help?”. I have no idea whats going on ember inspect shows the correct view class and controller class pointing to the correct templates. even {{this}} returns nothing. Before logging a bug I’m wondering if anyone can give me tips on how to debug? thanks


#2

throw in {{log model}} and see what model is at that point?


#3

Perhaps a dumb question, but are you sure that template is being used for that view? Does just tossing in a string literal appear in the DOM? Are you able to replicate this with a jsbin?


#4

yes, hence why only “help?” is printed, nothing inside the if statement appears however


#5

I think I might have a candidate, im seeing en error trying to access this.$() from the view class. Even though the state of the view is “inserted” and the state is “inDOM” it is apparently in the dom and its throwing an exception. This also seems to be a regression I’ll comment that part out and see if it helps


#6

forget that, its still broken


#7

Try and isolate it with a jsbin, would be helpful in helping to get this fixed – even if this turns out to be a bug in Ember.


#8

I seem to have fixed it anyway, I had some legacy code for backwards compatibility which I can now get rid of.

thanks anyway! I appreciate the quick replies (i’ll close this now)