1

We have both Bugzilla (3.2.5.1-2) and Mediawiki (1.20.2) and I would like an easy way to create links to bug reports from a wiki page. I've noticed that the main Wikipedia site has a shortcut to bug reports; the wiki text

[[bugzilla:1234]]

renders in HTML as a link to the external Bugzilla

<a title="bugzilla:1234" class="extiw" href="https://bugzilla.wikimedia.org/show_bug.cgi?id=1234">bugzilla:1234</a>

When I try this all I get is get a link to a (non-existant) page in the bugzilla namespace

<a title="Bugzilla:1234 (page does not exist)" class="new" href="/w/index.php?title=Bugzilla:1234&amp;action=edit&amp;redlink=1">bugzilla:1234</a>

What am I missing? Is there a setting in LocalConfig I need to add, or an extension I need to install?

There is a setting $wgUrlProtocols to add protocols, but I don't see how you get the extra text for the external link to appear.

1 Answers1

2

It looks like it is done by manually adding an entry into MediaWiki's interwiki table (reference):

 REPLACE INTO interwiki (iw_prefix, iw_url, iw_local) VALUES
      ('bugzilla','http://bugs.site.com/show_bug.cgi?id=$1',0);

The caveats of manually editing a database apply (backup table/database, double-check your query, etc...).

uesp
  • 3,414
  • 1
  • 18
  • 16