The API return in XML for queries with no result elements was broken a few hours ago. I believe the culprit is r46845 http://www.mediawiki.org/wiki/Special:Code/MediaWiki/46845 which does say it is a "breaking change", but the break intended is that applications may see query-continue earlier than expected (i.e. earlier than the limit the app set), which applications should usually handle anyway.
However it changes the XML structure for no results; if I query for (say) recentchanges in the last few hours, and there are none, it should (and did) return (in part):
<query><recentchanges /></query>
now it returns
<query recentchanges="">
which is not the same thing. Application code looking for the "recentchanges" element will see the return as missing, incomplete, or some error, rather than an empty element.
For RC, the code diff is http://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/includes/api/ApiQuery...
given the way setIndexedTagName_internal apparently works.
I think (but haven't tested) this breaks null returns for everything, and thus a lot of applications may have trouble. Can we get it backed out and re-committed when it generates the correct XML? (I will patch a couple of my things for now.)
Best regards, Robert
Robert Ullmann wrote: [...]
now it returns
<query recentchanges="">
Filed in Bugzilla at https://bugzilla.wikimedia.org/show_bug.cgi?id=17552
-- Tim Starling
(Did you read http://thread.gmane.org/gmane.org.wikimedia.mediawiki.api/911 ? )
And for future reference, mediawiki-api mailing list might be more convenient to flag api-related issues ;)
Cheers,
2009/2/18 Tim Starling tstarling@wikimedia.org:
Robert Ullmann wrote: [...]
now it returns
<query recentchanges="">
Filed in Bugzilla at https://bugzilla.wikimedia.org/show_bug.cgi?id=17552
-- Tim Starling
Wikitech-l mailing list Wikitech-l@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikitech-l
wikitech-l@lists.wikimedia.org