Page MenuHomePhabricator

Incorrect longitude/latitude handling on anything that is not a city/town etc in summary endpoint
Closed, ResolvedPublic

Description

I noticed pages which are places e.g. buildings, ruins etc do not have lat, lon coordinates despite existing on the page:
https://en.wikipedia.org/api/rest_v1/page/summary/Acropolis
https://en.wikipedia.org/api/rest_v1/page/summary/Antonín Dvořák Museum

it seems the summary endpoint only adds them if there are coordinates at the top of the page - it ignores infoboxes {{coord|...display=title}}
The handling should be updated. There are likely many impacted pages

Event Timeline

Hi @Jdlrobson ! Regarding template docs it does not display in the mobile view of Wikipedia, it is desktop only.
I've checked /summary endpoint for Acropolis article, it doesn't have coordinates property because this article does not have a dedicated template (which is expected). I've dove deeper and checked coordinates restrictions on mobile html level. These restrictions persist here in MobileHTML and styles. It seems, template works as expected, please re-check.

Looks like Acropolis has been edited since I reported this.

The other article seems to have coordinates in both:
https://en.wikipedia.org/w/api.php?action=query&format=json&prop=coordinates&titles=Anton%C3%ADn%20Dvo%C5%99%C3%A1k%20Museum
but I can't tell how that was fixed.

We can call this resolved for now. Will reopen if I find any new examples