KumaScript macro using page.uri shows incorrect URI in wiki preview.



2 years ago
a year ago


(Reporter: Leif.AMO, Unassigned)





2 years ago
User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:50.0) Gecko/20100101 Firefox/50.0 Waterfox/50.0
Build ID: 20161118143512

Steps to reproduce:

1. Editing Wiki at:


2. KumaScript macro {{ manch("getStartupChanges") }} is present.  The entirety of the KumaScript macro is this:

<code><a href="<%-page.uri + '#' + $0 + '()'%>"><%-$0%>()</a></code>

3. Preview page.  Active URI is now:


4. Find and mouse over or click on the "getStartupChanges()" link.

Actual results:

1. URI points to wrong page.  https://developer.mozilla.org/#getStartupChanges()

2. Can't verify correctness of link without publishing first, reducing effectiveness of using preview to catch errors while editing.

Expected results:

1. In preview, link should point to current page.


2. Note that on regular page view, the link is correctly generated.

3. Suspect it's related to, symptomatic of, or a duplicate of bug #973678, but not entirely sure, as the template gives no error warning, page.uri simply acts unexpectedly by creating a URI fragment with protocol and host name without any path.

4. I've noticed more templates misbehaving (but not giving error warnings) in preview mode, they simply omit portions of output (i.e. <h2> is missing "id" attribute).  Should I continue to file bug reports separately?  Or append the existing related bug report?  Thanks.


2 years ago
Component: Untriaged → KumaScript
Product: Firefox → Mozilla Developer Network
Version: 50 Branch → unspecified
See Also: → bug 973678
You need to log in before you can comment on or make changes to this bug.