Page MenuHomePhabricator

Fix links on mediawiki.org using Method doclink and Class doclink templates
Open, Needs TriagePublic

Description

Links on mediawiki.org using Template:Method doclink and Template:Classdoclink are no longer providing working links to the MediaWiki PHP docs. Instances of these templates need to be modified to support namespaced classes.

To fix:

Event Timeline

Sometimes the anchors needs to be changed too.

It looks like this is a result of T166010. For example:

  • broken link: {{method doclink | class=Parser | anchor=a501ce7bb8f461a1b5fbd9f05970cab67 | method=setFunctionHook()}}
  • working link: {{method doclink | class=MediaWiki\Parser\Parser | anchor=a34da5613dad9dd0a5e921aa7bceba3cf | method= setFunctionHook()}}

So the class needs to be replaced with the namespaced class and the anchor needs to be updated, as @Wargo pointed out.

It looks like this also impacts https://www.mediawiki.org/wiki/Template:Class_doclink, however those links only need class names updated.

We'll need to update the anchors one by one anyways, but should we add namespaced class names in the class parameter (such as class=MediaWiki\Parser\Parser) or should we add a namespace parameter to these templates (so we'd have namespace=MediaWiki\Parser class=Parser)?

apaskulin renamed this task from Fix links on mediawiki.org using Template:Method doclink to Fix links on mediawiki.org using Method doclink and Class doclink templates.Jan 10 2025, 12:59 AM
apaskulin updated the task description. (Show Details)