Page MenuHomePhabricator

API: Add a way to get the associated talk/subject page of a title
Open, MediumPublic

Description

As a script developer,
I want to be able to retrieve the title of the talk/subject page associated with another title,
in the context of a foreign wiki

For the local wiki, mw.Title can be used, but that doesn't support representing titles on other wikis as far as I can tell.

This would be suitable for the query info api, which already supports returning the page ids for the associated pages

Event Timeline

DannyS712 created this task.Jul 3 2020, 2:52 AM
Restricted Application added a project: User-DannyS712. · View Herald TranscriptJul 3 2020, 2:52 AM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
DannyS712 moved this task from Unsorted to Later on the User-DannyS712 board.Jul 3 2020, 2:52 AM
DannyS712 moved this task from Backlog to Later on the MediaWiki-extensions-GlobalWatchlist board.

(Use case is for MediaWiki-extensions-GlobalWatchlist, but actually applying it should be a separate task)

Legoktm renamed this task from Add a method to get the associated talk/subject page of a title to API: Add a way to get the associated talk/subject page of a title.Jul 6 2020, 9:09 AM

I imagine this would fit in prop=info, maybe with inprop=associated or something.

inprop already includes talkid for the page id, if any, of the talk page, and subjectid for the page id, if any, of the subject page. Should we add associatedpage for the string and, if available, the page id, for fetching the info of the associated page, rather than splitting it into talk page and subject page?

eprodromou triaged this task as Medium priority.
eprodromou moved this task from Inbox to Feature Requests to Review on the Platform Engineering board.
eprodromou added a subscriber: eprodromou.

OK, looks like this is something I should help out with. Is the main issue that it's hard to do the bitwise math on namespace numbers...? I need to examine this further.

OK, looks like this is something I should help out with. Is the main issue that it's hard to do the bitwise math on namespace numbers...? I need to examine this further.

Title::getOtherPage should take care of the namespace number issue