Closed Bug 957703 Opened 11 years ago Closed 8 years ago

Preview Changes causes TemplateExecutionError in macro DomRef

Categories

(developer.mozilla.org Graveyard :: KumaScript, defect)

defect
Not set
minor

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 973678

People

(Reporter: mikehenrty, Unassigned)

Details

When I try to preview changes on certain documents (for instance, https://developer.mozilla.org/en-US/docs/Web/API/Apps.getSelf), I get the following template execution error:

TemplateExecutionError at document offset 3 in macro DomRef ([]) ( edit ): 

Problem executing template DomRef:
    1 | <p>{{ DomRef() }}</p>
-----------^
    2 | <p>{{ non-standard_header() }}</p>
    3 | <h2 id="Summary">Summary</h2>

TypeError: ejs:50
    48| 
    49| %><%- result %></span>
 >> 50| <%
    51| function containsTag(tagList, tag) {
    52|     if (!tagList || typeof tagList == 'undefined') return 0;
    53|     if (!tag || typeof tag == 'undefined') return 0;

Cannot call method 'split' of undefined
    at eval at <anonymous> (/data/www/developer.mozilla.org/kuma/kumascript/node_modules/ejs/lib/ejs.js:203:1)
    at /data/www/developer.mozilla.org/kuma/kumascript/node_modules/ejs/lib/ejs.js:201:15
    at /data/www/developer.mozilla.org/kuma/kumascript/lib/kumascript/templates.js:75:30
I've also stumbled on this bug while editing this page : 

https://developer.mozilla.org/en-US/docs/Web/API/Node.previousSibling

Link to the guilty DomRef template : 

https://developer.mozilla.org/en-US/docs/Template:DomRef
Severity: normal → minor
FWIW, this looks very similar to bug 945974 (cannot call method ... of undefined with DomRef).
For what it's worth, this still happens.
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → DUPLICATE
Product: developer.mozilla.org → developer.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.