Page MenuHomePhabricator

API most time doesn't return results when using query that contains spaces in title
Closed, InvalidPublic

Description

Author: mario.biron

Description:
If you try to get a specific page title using the API, the query action method won't return any results if the title searched contains a space.

If you try to get the following page: http://fr.wikipedia.org/wiki/Jacques_Villeneuve
Using:
http://fr.wikipedia.org/w/api.php?action=query&redirects&format=xml&prop=revisions&rvprop=content&titles=jacques_villeneuve
or
http://en.wikipedia.org/w/api.php?action=query&redirects&format=xml&prop=revisions&rvprop=content&titles=jacques_villeneuve
You get no results

Same for:
http://fr.wikipedia.org/wiki/Jacques_Villeneuve
Using
http://fr.wikipedia.org/w/api.php?action=query&redirects&format=xml&prop=revisions&rvprop=content&titles=gilles_villeneuve
or
http://en.wikipedia.org/w/api.php?action=query&redirects&format=xml&prop=revisions&rvprop=content&titles=gilles_villeneuve

But, if you try this one:
http://fr.wikipedia.org/wiki/Elvis_Presley
Again, you will not get any results using
http://fr.wikipedia.org/w/api.php?action=query&redirects&format=xml&prop=revisions&rvprop=content&titles=elvis_presley
but if you using this search query instead:
http://en.wikipedia.org/w/api.php?action=query&redirects&format=xml&prop=revisions&rvprop=content&titles=elvis_presley
then you get the following:
http://fr.wikipedia.org/wiki/Elvis_Presley

What's missing?

Note that I tried replacing the space character with a "_", a "+" or a "%20" to no avail. Tried to enclose the searched title in quotes and it didn't work either.


Version: unspecified
Severity: normal
URL: http://fr.wikipedia.org/w/api.php?action=query&redirects&format=xml&prop=revisions&rvprop=content&titles=elvis_presley

Details

Reference
bz12783

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 21 2014, 10:04 PM
bzimport set Reference to bz12783.
bzimport added a subscriber: Unknown Object (MLST).

mario.biron wrote:

Ps: in case this is known, I appologize. I did search through Google to find any instance of this issue and couldn't find anything directly related.

You should use captials: Jacques_Villeneuve , not jacques_villeneuve (which is in fact a different page).