Opened 7 years ago

Closed 7 years ago

#1586 closed bug (fixed)

Sign-ups with broken location data

Reported by: planetcruiser Owned by: planetcruiser
Priority: major Milestone: 0.5.9 - bugfixing
Component: BW Geo Keywords:
Cc:

Description

Issue:

  • About 1% of new members have broken location data (ADM1 location class instead of PPL location class)
  • Currently about 50 people with this problem are pending to be accepted

Reproduce:

  • This issue can not be reproduced by us yet

Solution:

  1. Make sure people can only continue sign-up if a PPL class location has been selected
  2. Automatically sanitise broken location (preferred)

Clues:

Related ticket:

Change History (23)

comment:1 follow-up: Changed 7 years ago by globetrotter_tt

  • I tried to set my profile location to Hagåtña in Guam. The location is found in the editmyprofile form and also in step 3 (location) of the signup.
  • Hagåtña is then shown in my profile, but not the region (Hagåtña Municipality) and country (Guam) is displayed.
  • In places: http://www.bewelcome.org/places Guam is not listed a country, in http://www.geonames.org/countries/ where we get our data from it is listed.
  • So actually now i have a PPL location (Hagåtña, the capital city), but no connected ADM1(country) and ADM2 (region)

For all feature codes: http://www.geonames.org/export/codes.html

comment:2 Changed 7 years ago by globetrotter_tt

I might be also worth to have a look at http://www.bewelcome.org/geo/admin

Is this documented anywhere?

comment:3 Changed 7 years ago by planetcruiser

  • Milestone changed from unassigned to 0.5.8 - bugfixing

while fixing the cities/regions/country table usage to geonames_* tables i gained quite some insight in the matter. if anyone has questions about this, please ask :)

comment:4 in reply to: ↑ 1 Changed 7 years ago by micha

Replying to globetrotter_tt:

  • I tried to set my profile location to Hagåtña in Guam. The location is found in the editmyprofile form and also in step 3 (location) of the signup.
  • Hagåtña is then shown in my profile, but not the region (Hagåtña Municipality) and country (Guam) is displayed.
  • In places: http://www.bewelcome.org/places Guam is not listed a country, in http://www.geonames.org/countries/ where we get our data from it is listed.
  • So actually now i have a PPL location (Hagåtña, the capital city), but no connected ADM1(country) and ADM2 (region)

That is indeed weird. I just locally tested to sign up with this location (Hagåtña) and could do so without problems. We should check https://www.gitorious.org/bewelcome/rox/blobs/develop/build/geo/geo.model.php

Right away I found a spelling error: if(!$hierarchy) $retun = false; instead of if(!$hierarchy) $return = false;

comment:5 Changed 7 years ago by planetcruiser

  • Owner set to planetcruiser
  • Status changed from new to accepted

if fixed the spelling mistake via https://www.gitorious.org/bewelcome/rox/commit/8295aac18be98d29c55dfb824b29277d18819490 and deployed to http://alpha.bewelcome.org/ - could anyone please test if the error still occurs?

comment:6 Changed 7 years ago by planetcruiser

i just tested myself by setting my location to "Hagåtña" - it's not fixed yet. but at least we know how to reproduce this now - great! :)

but we also have problems with people living in countries that *are* listed in http://www.bewelcome.org/places , right?

comment:7 Changed 7 years ago by planetcruiser

note to self: examples of users with location issues in a country that is listed in places - http://alpha.bewelcome.org/places/GP/Guadeloupe

comment:8 Changed 7 years ago by planetcruiser

fixing country/region display of members in cities without a parent country set in geonames_cache table (i.e. http://alpha.bewelcome.org/places/GP/Guadeloupe) via:

comment:9 Changed 7 years ago by planetcruiser

  • Resolution set to fixed
  • Status changed from accepted to closed

i believe this issue is fixed now. i can also see Guam in http://alpha.bewelcome.org/places

database inconsistencies are now covered by #1614

comment:10 Changed 7 years ago by globetrotter_tt

  • Milestone changed from 0.5.8 - bugfixing to 0.5.9 - bugfixing
  • Resolution fixed deleted
  • Status changed from closed to reopened

i found another profile with broken location data:

http://www.bewelcome.org/members/26641

comment:11 Changed 7 years ago by globetrotter_tt

I think this is a general problem for Hong Kong. Check all profiles here: http://www.bewelcome.org/places/HK

There is no parentAdm1Id or parentCountryId defined for Hongkong (geonameId: 1819729)

comment:12 follow-up: Changed 7 years ago by globetrotter_tt

and another one: http://www.bewelcome.org/members/15554

this is for a place called "Apold" Romania?

Last edited 7 years ago by globetrotter_tt (previous) (diff)

comment:13 Changed 7 years ago by globetrotter_tt

and this one: http://www.bewelcome.org/members/26929 also from Romania

comment:14 Changed 7 years ago by globetrotter_tt

Ok.... I noticed that the two cities Apold and Tîrgu Neamţ in Romania had no administrative division defined in geonames. I edited it directly on http://www.geonames.org

  • Apold-> Mureș
  • Târgu_Neamț -> Neamţ

Let's wait and see if our daily update from geonames works.

Last edited 7 years ago by globetrotter_tt (previous) (diff)

comment:15 follow-up: Changed 7 years ago by globetrotter_tt

hmmm, the two profiles show still no region and country. not sure if our update script works.

comment:16 Changed 7 years ago by planetcruiser

  • Status changed from reopened to accepted

will look at this again

comment:17 in reply to: ↑ 15 Changed 7 years ago by planetcruiser

Replying to globetrotter_tt:

hmmm, the two profiles show still no region and country. not sure if our update script works.

did you check if your changes already made it into the geonames incremental updates (http://download.geonames.org/export/dump/modifications-DATE.txt)?

comment:18 in reply to: ↑ 12 Changed 7 years ago by planetcruiser

Replying to globetrotter_tt:

and another one: http://www.bewelcome.org/members/15554

this is for a place called "Apold" Romania?

hehe, apold is the village in romania i regularly visit. this one: http://gallery.benn.org/main.php?g2_itemId=130 :) i don't know the guy though.

comment:19 Changed 7 years ago by globetrotter_tt

Modification for "Apold" are in this dump: http://download.geonames.org/export/dump/modifications-2012-04-02.txt

Let's see if it will make it to our db.

comment:20 Changed 7 years ago by planetcruiser

committed a fix that at least shows the country for the broken profiles: https://gitorious.org/bewelcome/rox/commit/6e336a6ec04d9daf4d951397ea4871cdffc73b32

now for the romanian and hong kong places it says something like: "Hong Kong (Error: City has no region) Hong Kong", see http://alpha.bewelcome.org/members/26641

i think the solution is to manually add regions in our geonames_cache and also the geonames source db to the places that don't have a region set. in the case for hong kong we might need to find a different solution.

will test some more with hong kong data..

comment:23 Changed 7 years ago by planetcruiser

  • Resolution set to fixed
  • Status changed from accepted to closed

as of now apold still has 2698 inhabitants and no parent admin in our db. but that's another issue (geo update possibly not working properly).

the original issue of this ticket is fixed, or let's say the display of a member's location in their profile is fixed now, even if underlying geo data is inconsistent. closing, moving on. ;)

Note: See TracTickets for help on using tickets.