emberjs/ember.js — Issue #259: Non-WebKit browsers (Opera, Firefox) Throwing Error on Template Loading
Author: nathanhammond
Created: 2011-12-14 21:34:12+00:00
State: open

Simplified Test Case:
https://gist.github.com/1478619

From Opera, Stack Trace:
Uncaught exception: Error: - Unable to find template "president".
Error thrown at line 10863, column 8 in (key, value) in ember-0.9.1.js:
throw new Ember.Error(fmt('%@ - Unable to find template "%@".', [this, templateName]));
called via Function.prototype.call() from line 5321, column 4 in (obj, keyName) in ember-0.9.1.js:
ret = cache[keyName] = this.func.call(obj, keyName);
called from line 2262, column 14 in (obj, keyName) in ember-0.9.1.js:
return desc.get(obj, keyName);
called from line 11027, column 4 in (buffer) in ember-0.9.1.js:
var template = get(this, 'template');
called from line 11642, column 4 in (parentBuffer, bufferOperation) in ember-0.9.1.js:
this.render(buffer);
called from line 11457, column 4 in () in ember-0.9.1.js:
var buffer = this.renderToBuffer();
called from line 12098, column 4 in (view, fn) in ember-0.9.1.js:
view.createElement();
called via Function.prototype.apply() from line 11061, column 10 in (name) in ember-0.9.1.js:
return fn.apply(this, args);
called via Function.prototype.apply() from line 3806, column 2 in invoke(target, method, args, ignore) in ember-0.9.1.js:
return method.apply(target || this, args || []);
called from line 3861, column 6 in iter(item) in ember-0.9.1.js:
invoke(item.target, item.method, item.args);

Reproduction:
1. Save the Gist down.
2. Load the page.
3. Note that the content does appear in Safari and Chrome.
4. Note that the content does not appear in Firefox or Opera.

Comments:
I do believe that it is at least appearing on the page at some point in the process before throwing the error as I have seen both Firefox and Opera display the content momentarily ... either that or it is a race condition on loading of the template.