Last modified: 2013-04-22 16:15:55 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T41954, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 39954 - MediaWiki's info action headers need anchors
MediaWiki's info action headers need anchors
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
unspecified
All All
: Unprioritized normal (vote)
: ---
Assigned To: Nobody - You can work on this!
https://www.mediawiki.org/wiki/MediaW...
: easy
Depends on:
Blocks: 38450
  Show dependency treegraph
 
Reported: 2012-09-04 01:46 UTC by MZMcBride
Modified: 2013-04-22 16:15 UTC (History)
2 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description MZMcBride 2012-09-04 01:46:38 UTC
The headers of MediaWiki's info action should have anchors, similar to anchors created by wikitext headers (i.e., "== Foo =="). The current HTML output of <https://www.mediawiki.org/wiki/MediaWiki?action=info> looks like this (for a particular section header):

---
<h2>Edit history</h2>
---

Ideally it would look something like this:

---
<h2> <span class="mw-headline" id="Edit_history">Edit history</span></h2>
---

Looking at the InfoAction.php code (<https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/core.git;a=blob;f=includes/actions/InfoAction.php>), it seems it's already using addHeader. So perhaps there's a flag that can be passed to this function to add the span/CSS id? Or perhaps $wgParser needs to be called? I'm not sure.

It shouldn't be too difficult to add an anchor here, though. It'll need to be auto-generated to account for localization/customization of the interface messages, though. Marking this as easy.
Comment 1 MZMcBride 2012-09-04 02:02:39 UTC
(In reply to comment #0)
> Looking at the InfoAction.php code
> (<https://gerrit.wikimedia.org/r/gitweb?p=mediawiki/core.git;a=blob;f=includes/actions/InfoAction.php>),
> it seems it's already using addHeader. So perhaps there's a flag that can be
> passed to this function to add the span/CSS id? Or perhaps $wgParser needs to
> be called? I'm not sure.

Hmm. I hadn't realized that the addHeader function is local to InfoAction.php. I thought this was a global function.

So perhaps there's a global function that can be employed here instead? It looks like Special:Version has the behavior I want. It seems to use Xml::element('h2' ...) for this. Instead of addHeader() calling Html::element() as it does now, maybe it can simply call Xml::element()? Just a pointer for the person who ends up trying to resolve this bug.
Comment 2 Alex Monk 2012-09-04 13:09:51 UTC
Gerrit change #22547

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links