Page MenuHomePhabricator

French Nearby doesn't work (If geodata is not installed the special page should 404)
Closed, ResolvedPublic

Description doesn't work < no geodata installed?

Version: unspecified
Severity: normal



Related Objects

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 1:39 AM
bzimport set Reference to bz48512.

If geodata is not installed the special page should 404.

Let's set $wgMFNearby = false on all projects that don't have geodata or any data...

GeoData is enabled on French Wikipedia, unless I am reading configuration wrong.

Have you confirmed with someone in France that Special:Nearby is not working on frwiki? If you used the feature from SF it's possible there really are no frwiki articles nearby.

I did notice on I receive a JS error:

Uncaught TypeError: Cannot read property 'pages' of undefined nearby.js:137
(anonymous function) nearby.js:137
fire load.php:974
self.fireWith load.php:1084
done load.php:7803

Perhaps because there are no results? Fwiw, I see the same error on

BTW I am checking these from Monterey, CA.

The API currently responds with:

A successful result however is expected to look like this:

{"query":{"pages":{"20004112":{"pageid":20004112,"ns":0,"title":"The Montgomery (San Francisco)","thumbnail":{"source":"","width":119,"height":180},"pageimage":"The_Montgomery,_San_Francisco.jpg","coordinates":[{"lat":37.787,"lon":-122.4,"primary":""}]}

If the API is returning no results it should respond with
{"query":{"pages":{}}, "limits":{"coordinates":500} }

We have too much special casing of all the edge error cases in the API. Let's not introduce even more...

Related URL: (Gerrit Change Id3cb6fcf3c7bc268ddab4edb5bade56a7a595b73) (Gerrit Change Id3cb6fcf3c7bc268ddab4edb5bade56a7a595b73) | change APPROVED and MERGED [by Jdlrobson]