Closed Bug 1329357 Opened 7 years ago Closed 5 years ago

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

Categories

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

defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 973678

People

(Reporter: Leif.AMO, Unassigned)

References

Details

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:

    https://developer.mozilla.org/en-US/Add-ons/Add-on_Manager/AddonManager$edit

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:

    https://developer.mozilla.org/en-US/docs/preview-wiki-content

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.

    https://developer.mozilla.org/en-US/docs/preview-wiki-content#getStartupChanges()

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.
Component: Untriaged → KumaScript
Product: Firefox → Mozilla Developer Network
Version: 50 Branch → unspecified
See Also: → 973678
Status: UNCONFIRMED → RESOLVED
Closed: 5 years ago
Depends on: 973678
Priority: -- → P5
Resolution: --- → DUPLICATE
No longer depends on: 973678
Depends on: 973678
Product: developer.mozilla.org → developer.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.