Page MenuHomePhabricator

IPInfo: Location subdivisions sometimes displayed in wrong order
Closed, ResolvedPublicBUG REPORT

Description

What is the problem?

The location is sometimes written in the wrong order, for example city, country, state.

I think it is because in MaxMind the subdivisions for a city are ...ordered from most general (largest) to most specific (smallest). (https://github.com/maxmind/GeoIP2-php/blob/master/src/Model/City.php#L24)

Steps to reproduce problem

An example on thegoodplace is: https://thegoodplace.wmcloud.org/rest.php/ipinfo/v0/log/69
(I won't give the IP here so as not to reveal information about the IP).

Expected behavior: Popup states: New York, Lincolnshire, England
Observed behavior: Popup states: New York, England, Lincolnshire

Screenshots (if applicable):

subdivisions_wrong_order.png (92×324 px, 6 KB)

Event Timeline

Niharika triaged this task as Medium priority.Jul 28 2021, 11:15 PM
Niharika moved this task from Untriaged to Triage/To be Estimated on the Anti-Harassment-Team board.