Opened 7 years ago

Closed 6 years ago

#1637 closed task (fixed)

OSM: migrate profile location update

Reported by: planetcruiser Owned by: planetcruiser
Priority: major Milestone: 1.2
Component: BW Geo Keywords:
Cc:

Change History (28)

comment:1 Changed 7 years ago by planetcruiser

  • Description modified (diff)

comment:2 Changed 7 years ago by planetcruiser

  • Owner set to toub
  • Status changed from new to assigned

comment:3 Changed 7 years ago by toub

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

Fixed, test here: http://rox.mishk.org

comment:4 Changed 7 years ago by toub

  • Resolution fixed deleted
  • Status changed from closed to reopened

comment:5 Changed 7 years ago by toub

Fixed. To be tested and review.

Commited to: https://gitorious.org/~toub/bewelcome/osm-rox Live demo here: http://rox.mishk.org/

comment:6 Changed 7 years ago by toub

  • Owner changed from toub to planetcruiser
  • Status changed from reopened to assigned

comment:7 Changed 7 years ago by globetrotter_tt

  • Milestone changed from unassigned to 0.9 - OSM

comment:8 Changed 6 years ago by planetcruiser

  • Milestone changed from 0.9 to unassigned

toub is travelling until end of september, let's reschedule this once he is back

comment:9 Changed 6 years ago by planetcruiser

  • Milestone changed from unassigned to 1.0

1.0 is the new osm release

comment:10 Changed 6 years ago by toub

Fixed, merged with develop branch, then pushed to a new temporary branch named "osm": https://gitorious.org/bewelcome/rox/commits/osm

Ready for tests and review.

comment:11 Changed 6 years ago by midsch

I sucessfully changed the location for user Wukk via http://rox.mishk.org/setlocation with OSM

comment:12 Changed 6 years ago by crumbking

Tested locally in develop. Ready for alpha.

comment:13 Changed 6 years ago by sitarane

Tested in alpha. Changed location back and forth fine.

comment:14 Changed 6 years ago by toub

ok on alpha

comment:15 Changed 6 years ago by globetrotter_tt

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

Works also for me.

comment:16 Changed 6 years ago by crumbking

  • Resolution fixed deleted
  • Status changed from closed to reopened

I get this error on http://alpha.bewelcome.org/setlocation

 Notice: Trying to get property of non-object in /var/rox/deployment/alpha.bewelcome.org-3e994e4/build/members/templates/setlocation.column_col3.helper.php on line 40 

Okay it is a city specific bug: Try Marawi in the Philippines. There are 2 options Marawi City and Marawi. Marawi has no region. I guess that's the error. But an update works even with this notice.

comment:17 Changed 6 years ago by shevek

I could reproduce it once but now it's no longer possible. I tried to find other cities as well which show the problem but couldn't.

comment:18 Changed 6 years ago by mahouni

I couldn't reproduce it..

comment:19 Changed 6 years ago by crumbking

Steps to reproduce:

Mathias was able to reproduce wihle chatting. But as this notice will not show up on www and seems not related to the map/gui improvments I suggest to move to a new ticket.

Anyway I believe the code try to search for the city parent() which is empty? in this case.

comment:20 Changed 6 years ago by shevek

The first time I saw it it showed a big php error message and not a small notice. That is visible in the www.

Depending on the browser it seems that sometimes as a side effect the save location button vanishes if you hit the problem.

The parentAdm1Id for Marawi is 0 as for Marawi City. There are some 169 more places like that.

comment:21 Changed 6 years ago by crumbking

Yeah if you enter only one character like: M or A and hit the search button you get:

Sorry :(

BeWelcome has just suffered an error of some magnitude (i.e. we cannot show you the page you were looking for and something went wrong as we looked for it), which is why you are looking at this error message. We apologise for the inconvenience many times, and humbly request that you send the address of this page to us through the feedback (and hopefully that is not the page that brings up this error ...).

comment:22 Changed 6 years ago by shevek

That's also true for www.bewelcome.org so isn't OSM related.

comment:23 Changed 6 years ago by shevek

The problem is that suggestlocation in geo.model.php returns for searches of length 0 or 1. After five tries the controller throws an exception.

By just commenting the first lines (113-115) out the search works fine (but doesn't reveal any useful results). For 0 it gives a list of cities which have 'City' as part of their name. I submit that change.

Last edited 6 years ago by shevek (previous) (diff)

comment:24 Changed 6 years ago by shevek

Commit a second change to fix the error message.

comment:25 Changed 6 years ago by shevek

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

comment:26 Changed 6 years ago by crumbking

cool both problems

  • exception while only search with one character
  • Marawi

are fixed :-)

thanks

comment:27 Changed 6 years ago by planetcruiser

  • Resolution fixed deleted
  • Status changed from closed to reopened

there is a bug when updating the location several times in a row. reproduce:

  1. go to http://alpha.bewelcome.org/setlocation
  2. search berlin, select first match, click save
  3. search another location, select first match, click save
  4. berlin is shown again, the second location was not saved

on www this works fine. i will look into this now.

comment:28 Changed 6 years ago by planetcruiser

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

fixed via https://gitorious.org/bewelcome/rox/commit/0ec0a270a911a436ddbb510ec85791a8cacd0e52

the solution was trivial in the end, but to find out what the heck is going wrong between our greatly obfuscated form handling, ajax requests, js hacks and php/html soup was soooo much fun.

our location update spaghetti bundle is a health hazard - to users and coders alike! gaaaah! </rant>

Note: See TracTickets for help on using tickets.