The following query: http://commons.wikimedia.org/w/api.php?action=query&list=allcategories&a... yields a list that contains "Reptil", "Reptile", and "Reptiles".
I've developed a clientside solution for testing for and traversing the "soft" category redirects that may show up in the category listing (e.g. http://commons.wikimedia.org/wiki/Category:Reptiles).
However, the pages "Reptil" and "Reptile" do not even exist. It is problematic when these entries are presented to the user in the form of "autocomplete" search suggestions; if the user selects one of these entries, I could do a test for page existance, but a failed test is disruptive as it forces the user to make another choice, leaving them to wonder why it was offered in the first place.
My current project is making a free game for Android that has users categorize the images here: http://commons.wikimedia.org/wiki/Category:Media_needing_categories
Karl
I should have looked a little harder before posting: This works: http://commons.wikimedia.org/w/api.php?action=query&format=xml&list=... although I'm still curious why the missing pages are in the allcategories search.
Hope this helps somebody else...
Karl
On Sat, Oct 10, 2009 at 3:12 AM, Karl Ostmo kostmo@gmail.com wrote:
The following query:
http://commons.wikimedia.org/w/api.php?action=query&list=allcategories&a... yields a list that contains "Reptil", "Reptile", and "Reptiles".
I've developed a clientside solution for testing for and traversing the "soft" category redirects that may show up in the category listing (e.g. http://commons.wikimedia.org/wiki/Category:Reptiles).
However, the pages "Reptil" and "Reptile" do not even exist. It is problematic when these entries are presented to the user in the form of "autocomplete" search suggestions; if the user selects one of these entries, I could do a test for page existance, but a failed test is disruptive as it forces the user to make another choice, leaving them to wonder why it was offered in the first place.
My current project is making a free game for Android that has users categorize the images here: http://commons.wikimedia.org/wiki/Category:Media_needing_categories
Karl
Karl Ostmo wrote:
This works: http://commons.wikimedia.org/w/api.php?action=query&format=xml
&list=allpages&apnamespace=14&apprefix=Rept
although I'm still curious why the missing pages are in the allcategories search.
Non-existent pages ''can'' be returned by list=allcategories ''if'' there are pages filed in a redlinked category. But that doesn't seem to be the case here, so I am as mystified as you.
Russ
On Sat, Oct 10, 2009 at 08:08:31AM -0400, Russell Blau wrote:
Karl Ostmo wrote:
This works: http://commons.wikimedia.org/w/api.php?action=query&format=xml
&list=allpages&apnamespace=14&apprefix=Rept
although I'm still curious why the missing pages are in the allcategories search.
Non-existent pages ''can'' be returned by list=allcategories ''if'' there are pages filed in a redlinked category. But that doesn't seem to be the case here, so I am as mystified as you.
It's actually "if there were ever pages in the category"; it's the way MediaWiki's "category" table works, according to the code comments in maintenance/tables.sql:
mediawiki-api@lists.wikimedia.org