Closed Bug 775461 Opened 12 years ago Closed 12 years ago

Template:domxref is unable to resolve a cross-reference

Categories

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

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: robwu, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:13.0) Gecko/20100101 Firefox/13.0.1
Build ID: 20120615233552

Steps to reproduce:

I used the domxref template to create a cross-reference.https://developer-new.mozilla.org/docs/new?slug=undefined/DOM/window.showModalDialog


Actual results:

Upon preview, the link is resolved to:
https://developer-new.mozilla.org/docs/new?slug=undefined/DOM/window.alert

After saving the edit, the URL becomes:
https://developer-new.mozilla.org/docs/new?slug=en-US/DOM/window.alert


Expected results:

In both cases, the expected result is:
https://developer-new.mozilla.org/en-US/docs/DOM/window.alert
I'm a little confused. To what DOM term were you trying to create the link? You don't mention that here.
(In reply to Eric Shepherd [:sheppy] from comment #1)
> I'm a little confused. To what DOM term were you trying to create the link?
> You don't mention that here.

I'm referring to the domxref template, see https://developer-new.mozilla.org/en/docs/Template%3Adomxref.
Yeah, I understand you're using the domxref template, but what page are you trying to link to, and on which page are you using it? That's not clear from the way you worded the bug report. :)
Sorry, I just noticed that the first link was incorrect. I should have linked to https://developer-new.mozilla.org/en-US/docs/DOM/window.onbeforeunload.

I followed the following steps to produce the problem:

1. Source mode (to manually add templates)
2. I typed `{{domxref("window.alert()")}}`
3. I previewed the edit to observe that the link's target is "/docs/new?slug=undefined/DOM/window.alert".
4. I saved the edit, and see that the link points to "/docs/new?slug=en-US/DOM/window.alert".

Because `/en-US/docs/DOM/window.alert` exists, I expected that the link points to that path.
That helped a ton! Turns out there were a couple of bugs in the domxref template. I've fixed those, and all seems well now!

Thanks for this report, I appreciate it!
Status: UNCONFIRMED → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Version: Kuma → unspecified
Component: Docs Platform → Editing
Product: developer.mozilla.org → developer.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.