Svoboda | Graniru | BBC Russia | Golosameriki | Facebook
BBC RussianHomePhabricator
Log In
Maniphest T242346

Add special page to redirect from subject page to talk page
Closed, ResolvedPublic

Description

Currently, given the title of a MediaWiki page, it doesn’t seem to be easy for a client to construct a URL to that page’s talk page. Talk:​title yields a BadTitleError (T18746); inserting “ talk” before the first colon doesn’t work if the part before that isn’t actually a namespace (example) or if the namespace is translated (example). To do this correctly, I believe you would currently have to get the namespace info from the API and then parse the title yourself.

It would be great to have a special page redirecting to a page’s talk page, e. g. Special:TalkPage/​title or Special:Redirect/talk/​title. As far as I can tell, nothing of the sort currently exists.

Alternative approaches:

  • Provide an action instead of a special page. I don’t think an action makes sense for this. We already have several other redirecting special pages, so a talk page redirect would fit well.
  • Make Talk:​title actually redirect, as proposed in T18746. Probably technically possible, but looks like it might involve touching very fundamental parts of Title.php and MediaWiki.php, which seems more risky than introducing an independent special page.

Event Timeline

If the page’s namespace doesn’t have an associated talk namespace (e. g. Topic), the special page should probably show some kind of error.

prop=info from api can give only the pageid for talk/subject, but that seems to be easy reporting the name - than it is not needed to parse namespaceinfos

https://www.mediawiki.org/w/api.php?modules=query+info
https://www.mediawiki.org/w/api.php?action=query&titles=MediaWiki|Talk:MediaWiki&prop=info&inprop=talkid|subjectid|url

But it does not provide the way to get the fullurl of the talk page as for the requested page

Maybe it is easier to create a generator providing both titles and than using prop=info on the generator list (maybe more generic, but that only a idea)

Change 563445 had a related patch set uploaded (by Lucas Werkmeister (WMDE); owner: Lucas Werkmeister (WMDE)):
[mediawiki/core@master] Add Special:TalkPage for redirecting to talk pages

https://gerrit.wikimedia.org/r/563445

Change 563504 had a related patch set uploaded (by DannyS712; owner: DannyS712):
[mediawiki/core@master] Add Special:TalkPage for redirecting to talk pages

https://gerrit.wikimedia.org/r/563504

Change 563504 abandoned by DannyS712:
[mediawiki/core@master] Add Special:TalkPage for redirecting to talk pages

Reason:
Lucas Werkmeister (WMDE)'s way is probably better

https://gerrit.wikimedia.org/r/563504

@matmarex is there any relevant replacement project that can be used instead?

Not really, I'd just use MediaWiki-General like you already did. We don't have a generic tag for issues that affect talk pages.

(Talk Pages was supposed to be for the Talk pages project work only, but it was poorly named, so a few unrelated tasks like yours snuck in. We're now finishing the work on that project, so we archived the tag and re-triaged the tasks.)

Change #563445 merged by jenkins-bot:

[mediawiki/core@master] Add Special:TalkPage for redirecting to talk pages

https://gerrit.wikimedia.org/r/563445

Change #1031389 had a related patch set uploaded (by Lucas Werkmeister (WMDE); author: Lucas Werkmeister (WMDE)):

[mediawiki/core@master] Rename talkpage message to special-talkpage

https://gerrit.wikimedia.org/r/1031389

Change #1031389 merged by jenkins-bot:

[mediawiki/core@master] Rename talkpage message to special-talkpage

https://gerrit.wikimedia.org/r/1031389