Page MenuHomePhabricator

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

Description

https://fr.m.wikipedia.org/wiki/Sp%C3%A9cial:Nearby doesn't work < no geodata installed?


Version: unspecified
Severity: normal

Details

Reference
bz48512

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 fr.m.wikipedia.org/wiki/Special:Nearby 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
callback

Perhaps because there are no results? Fwiw, I see the same error on http://es.m.wikipedia.org/wiki/Especial:Nearby

BTW I am checking these from Monterey, CA.

The API currently responds with:
{"limits":{"coordinates":500}}

A successful result however is expected to look like this:

{"query":{"pages":{"20004112":{"pageid":20004112,"ns":0,"title":"The Montgomery (San Francisco)","thumbnail":{"source":"https://upload.wikimedia.org/wikipedia/commons/thumb/b/b1/The_Montgomery%2C_San_Francisco.jpg/119px-The_Montgomery%2C_San_Francisco.jpg","width":119,"height":180},"pageimage":"The_Montgomery,_San_Francisco.jpg","coordinates":[{"lat":37.787,"lon":-122.4,"primary":""}]}
,"limits":{"coordinates":500}}

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: https://gerrit.wikimedia.org/r/64120 (Gerrit Change Id3cb6fcf3c7bc268ddab4edb5bade56a7a595b73)

https://gerrit.wikimedia.org/r/64120 (Gerrit Change Id3cb6fcf3c7bc268ddab4edb5bade56a7a595b73) | change APPROVED and MERGED [by Jdlrobson]

Jdlrobson set Security to None.