Page MenuHomePhabricator

Pages created interface gives error for most projects in new XTools
Closed, ResolvedPublic1 Estimated Story Points

Description

When I go to http://tools.wmflabs.org/xtools-dev/pages and do a search against almost any project except English Wikipedia, I get a client-side notice saying:
"es.wikipedia.org is not a valid project" or "plwiki is not a valid project", etc.

And then usually it reloads the page giving me a server error:

500: Internal Server Error
An error has occurred within xTools.
The server said: String could not be parsed as XML

Event Timeline

kaldari triaged this task as Medium priority.Apr 23 2017, 1:31 AM
kaldari set the point value for this task to 1.
kaldari added subscribers: MusikAnimal, Samwilson.

@Samwilson: Is this a duplicate of T163527?

Yep, this should be fixed once with an updated version of mediawiki-api-base

So while the one bug for T163527 needed to be fixed, there was still more ways to improve getting project metadata within XTools. For that I've reworked a bunch of things, namely requiring a new parameter for the API path. This resolves our main issue, where before we were using addwiki's newFromPage to parse the HTML of a project page to get the API path. That to me is kind of crazy, and seems prone to error.

PR: https://github.com/x-tools/xtools-rebirth/pull/24

The other major change is we're getting most project metadata from the API via prop=siteinfo, as opposed to the wiki table in the meta database, which only gives us a handful of metadata. With prop=siteinfo we also have valuable things like the wiki path (/wiki/Article, may differ for 3rd party wikis), and the timezone, which we currently assume to be UTC. More PRs will follow to fix those issues and make XTools more 3rd-party-friendly, this PR is just about making the data accessible.

MusikAnimal moved this task from Backlog to Complete on the XTools board.