Page MenuHomePhabricator

Some MediaWiki API call examples show an empty result set due to chosen query parameters
Open, LowPublic


MediaWiki has gone and moved their "Main Page" to "MediaWiki". As a result of this, numerous API examples no longer work as originally intended. For example, clicking on the examples listed in the auto-documentation at , you will get an essentially empty result set, showing nothing of what the examples were intended to show.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 10 2019, 6:37 PM
Restricted Application added a project: Core Platform Team. · View Herald TranscriptOct 10 2019, 6:39 PM
Anomie triaged this task as Low priority.Oct 10 2019, 7:08 PM
Anomie moved this task from Unsorted to Needs Code on the MediaWiki-API board.
Anomie added a subscriber: Anomie.

Someone could theoretically use Title::getMainPage(), but I'm not sure the extra complexity would really be worth it. Note that most of the time you'd also be needing to pass the main page title into the corresponding i18n message.

I hadn't actually thought to check that, Reedy. Oops! That's odd, though. I could swear most of the examples used to work. Did they maybe point to en-wiki or something? Or am I just remembering the old manual documentation? <shrug>

Aklapper renamed this task from API examples need updating to Some MediaWiki API call examples show an empty result set due to chosen query parameters.Oct 11 2019, 4:15 PM

You may have looked at them on enwiki or some other wiki where the main page is "Main Page". The old auto-generated documentation used the same examples as the current documentation does in almost all cases.

I just checked, and I'm thinking of the old manually documented examples (Template:ApiEx). They all pointed at enwiki. I finished the API portion of my project quite some time ago, so I haven't had much call to look at the live docs since then.

eprodromou moved this task from Feature Requests to Review to Icebox on the Core Platform Team board.
eprodromou added subscribers: srodlund, eprodromou.

@srodlund this is a problem for the automatically generated documentation.

I don't know if there's a way to fix that in the documentation. I'm also not sure that @Anomie 's suggestion would actually help with that documentation.

I see ~41 references to "Main Page" in the API self-documentation. This is a pretty good first bug to fix.

@srishakatux @Aklapper Let's take a look at this together. Might be a good GCI task?

Might be a good GCI task?

@srodlund: Could you explain what exactly is supposed from a contributor in this task? Somehow finding and editing about 41 wiki pages on (by probably replacing something with something else)? Or something else? If I was a complete newcomer, what would I have to do?