[Mediawiki-api] Invalid page titles returned from queries

Russell Blau russblau at imapmail.org
Mon Mar 17 19:56:48 UTC 2008


"Roan Kattouw" <roan.kattouw at home.nl> said:
> Carl Beckhorn schreef:
>> It's already known among the developers that there can be obsolete
>> entries in the page table. One of these at the moment is pageid 414115
>> on enwiki, the article [[/.]], which has an illegal title. 
>> Unsurprisingly,
>> when that page was last edited, it was a redirect to [[Slashdot]].
>>
> That's the database's fault, not the API's. If this causes trouble,
> someone should write a maintenance script to delete these ghost pages.

Well, I'm the one who posted about this on enwiki, and was told in no 
uncertain terms by Tim Starling that it's the API's fault, not the 
database's.

The problem is that if the invalid title retrieved from one query is used in 
the titles= parameter of another query, the API returns a Bad Title error on 
the entire query (even if there are 50 titles |'ed together).  Some possible 
solutions to this, in no particular order:

1)  delete the damn page entry from the database
2)  change the API so that, if there is a bad title in the titles= 
parameter, it still returns the query result for all the valid titles.
3)  change the API so that it doesn't return the invalid page entry in the 
first place (probably not such a good idea, now that I think about it)

Russ




More information about the Mediawiki-api mailing list