Page MenuHomePhabricator

Sandbox for MediaWiki-style internal links within Bugzilla comments
Closed, InvalidPublic

Description

Please do not add yourself to the CC field if you do not want to get emails when people use this sandbox.

I looked all over for a sandbox to test out what works when creating links with wikitext in Bugzilla comments at bugzilla.wikimedia.org. Some wikitext can supposedly be used according to this:
*http://www.mediawiki.org/wiki/Bugzilla#Website_links_within_Bugzilla_comments

But it is not very detailed, and it does not link to any sources for its info. I want to update it, and so I need to test out many types of MediaWiki links, interwiki links, Commons links, links to talk sections, links to article sections, etc..

Here are some tests:

http://www.mediawiki.org/wiki/Bugzilla
*[[mw:Bugzilla]]
*[[mw:Bugzilla#Website links within Bugzilla comments]]

http://en.wikipedia.org/wiki/Wikipedia:Bug_reports_and_feature_requests
*[[Wikipedia:Bug reports and feature requests]]
*[[Wikipedia talk:Bug reports and feature requests]]
*[[Wikipedia:Bug reports and feature requests#Links from within Bugzilla]]

http://commons.wikimedia.org/wiki/Commons:Village_pump/Proposals
*[[commons:Commons:Village pump/Proposals]]
*[[commons:Commons talk:Village pump/Proposals#Village Pump 2]]


Version: unspecified
Severity: normal

Details

Reference
bz39828

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 12:52 AM
bzimport set Reference to bz39828.
bzimport added a subscriber: Unknown Object (MLST).

The links all work, but the links to sections of articles and talk pages take one to the top of the page, and not to the section.

Testing pipes:
*[[Wikipedia:Bug reports and feature requests]]
*[[Wikipedia:Bug reports and feature requests|Bugzilla]]

Closing so that it's clear that it's not a real bug report.

Testing another format for section links:
*[[mw:Bugzilla#Website_links_within_Bugzilla_comments]]

Testing a mixed format for section links:
*[[Wikipedia:Bug reports and feature requests#Links_from_within_Bugzilla]]

Testing interwikimedia links in various formats:
*http://en.wikipedia.org/wiki/Help:Interwikimedia_links
*http://en.wikipedia.org/wiki/Help:Link#Interwiki_links
*http://www.mediawiki.org/wiki/Bugzilla
*[[mw:Bugzilla]]
*[[:mw:Bugzilla]]
*[[wikibooks:Main Page]]
*[[:wikibooks:Main Page]]
*[[b:Main Page]]
*[[:b:Main Page]]

Links to other-language Wikipedias and Wikimedia projects:
*http://en.wikipedia.org/wiki/Help:Link#Interwiki_links
*http://en.wikipedia.org/wiki/List_of_Wikipedias
*http://de.wikipedia.org/wiki/Sandbox - German Wikipedia sandbox.
*[[de:Sandbox]]
*[[:de:Sandbox]]
*[[wikt:de:Main Page]]
*[[:wikt:de:Main Page]]

Testing piped links:
*http://en.wikipedia.org/wiki/Wikipedia:Piped_link
*[[:de:Sandbox|German Wikipedia sandbox]]

Testing some interwiki links outside Wikimedia:
*http://meta.wikimedia.org/wiki/List_of_largest_wikis
*http://www.mediawiki.org/wiki/Manual:Interwiki_table
*http://www.mediawiki.org/w/api.php?action=query&meta=siteinfo&siprop=interwikimap
*[[wikitravel:Main Page]]
*[[:wikitravel:Main Page]]
*[[meatball:MeatballWiki]]
*[[:meatball:MeatballWiki]]
*[[wikia:Main Page]]
*[[:wikia:Main Page]]
*[[cdwiki:Hauptseite]]
*[[:cdwiki:Hauptseite]]
*[[wikihow:Main-Page]]
*[[:wikihow:Main-Page]]

Testing ways to use apostrophes in links:
*[[meta:Don't delete redirects]]
*[[meta:Don%27t delete redirects]]
*http://meta.wikimedia.org/wiki/Don't_delete_redirects
*http://meta.wikimedia.org/wiki/Don%27t_delete_redirects

To see what has been learned from all these tests in this Bugzilla thread go here:
*[[Wikipedia:Bug reports and feature requests]] - go to the section named something like "Links from within Bugzilla".

Testing Wikia.com prefix from within Bugzilla some more:
All these links work from within Wikimedia pages:
*[[wikia:community:Admin Central:Forum]]
*[[wikia:community:Special:Forum]]
*[[wikia:cannabis:Main Page]]
*[[wikia:community:Main Page]]
This link does not work from within Wikimedia pages:
*[[wikia:Main Page]] -

Testing mediawiki prefixes some more:
*[[mw:Main Page]]
*[[mw:Extension:DPLforum]]
*[[mediawiki:Extension:DPLforum]] - this does not work from within Wikimedia.

Testing some other interwiki prefixes:
*[[wikivoyage:Main Page]]

See [[WP:Bugzilla]]. Testing the pound character (#).

Standard MediaWiki-style section links do not work. For example; this standard section link ends up being a link to the top of the page, and not to the section:

[[Wikipedia:Bug reports and feature requests#Links from within Bugzilla]]

There is a way to make working section links in Bugzilla without having to use the full URL. Copy the URL from the location bar of your browser, and add brackets around part of it. This works (assuming the section header uses the same name when you test it):

[[Wikipedia:Bug_reports_and_feature_requests#Links_from_within_Bugzilla]]

In Bugzilla threads it seems that once the pound key (#) is found in the link wikitext then spaces that follow break the link to the section or tab. Links to [[Special:Preferences]] tabs work due to the lack of spaces in the link wikitext:

[[Special:Preferences#mw-prefsection-gadgets]]

Another test. Spaces in the link before the pound character (#). No spaces after it:
*[[Wikipedia:Bug reports and feature requests#Links_from_within_Bugzilla]]

I don't think it will work because this method did not work before in a previous comment using this link:
*[[mw:Bugzilla#Website links within Bugzilla comments]]

But one link is a Wikipedia.org link, and one link is a Mediawiki.org link. So the test is useful.

(In reply to comment #9)

To see what has been learned from all these tests in this Bugzilla thread go
here:
*[[Wikipedia:Bug reports and feature requests]] - go to the section named
something like "Links from within Bugzilla".

Thanks for documenting this.

For your interest, the regular expressions that define this behavior are in
https://gerrit.wikimedia.org/r/gitweb?p=wikimedia/bugzilla/modifications.git;a=blob;f=bugzilla-4.0/extensions/Wikimedia/Extension.pm and patches are welcome.