wheelmap-classic icon indicating copy to clipboard operation
wheelmap-classic copied to clipboard

adding a new node on iOS only saves wheelchair, not toilet

Open holgerd opened this issue 8 years ago • 20 comments
trafficstars

  • I'm logged in on the iOS App (3.0.3 Build 209) and add a new node, giving it wheelchair=no and toilets:wheelchair=no and click save.
  • I reload after some minutes and find the new node as expected. But the toilets:wheelchair is not set and displayed as "unknown". It is this node: https://www.openstreetmap.org/node/4563117791
  • I expected that the toilet tag is also saved.

holgerd avatar Dec 21 '16 09:12 holgerd

I just reproduced this today by adding this node: https://www.openstreetmap.org/node/4585169493/history (I removed it to avoid cluttering the OSM with test entries)

holgerd avatar Jan 02 '17 10:01 holgerd

Using iPhone again, I added the toilets:wheelchair info to an existing POI and that worked as expected (this one: https://www.openstreetmap.org/node/1395834598 )

holgerd avatar Jan 02 '17 11:01 holgerd

@Svenyo can you pleas test this on android?

holgerd avatar Jan 02 '17 12:01 holgerd

Writing down my findings so far:

  • Android sends toilet_wheelchair as expected (saw this in the server logs)
  • According to the logs iPhone does not send toilet_wheelchair

I also found but not directly related to this issue:

  • iPhone sends all data in the request body, sends the API key via HTTP Header
  • Android sends all data including the API Key via query parameters

schultyy avatar Jan 11 '17 15:01 schultyy

Regarding toilet_wheelchair : This is an invalid tag I was not aware of before. Maybe you mean wheelchair_toilet as described in issue https://github.com/sozialhelden/wheelmap/issues/400 ? (also an invalid tag).

Correct is only toilets:wheelchair=yes/no.

holgerd avatar Jan 12 '17 08:01 holgerd

@schultyy the issue here is that toilet is not saved if both attributes are set at the same time (wheelchair and toilets:wheelchair)

holgerd avatar Jan 12 '17 08:01 holgerd

Regarding toilet_wheelchair and wheelchair_toilet: When an API Client (iOS or Android) sends data to create a new POI they send toilet_wheelchair. The API then converts toilet_wheelchair to toilets:wheelchair for OSM.

schultyy avatar Jan 12 '17 09:01 schultyy

To narrow the problem down I did the following:

  • Wrote some tests to ensure that wheelchair and toilets:wheelchair are actually correctly set. This works as expected.
  • Wrote another test which ensures that the API endpoint correctly passes wheelchair and toilets:wheelchair to OpenStreetMap. This works as expected.
  • I created a new POI via the iPhone application and had a look at the server logs: I created a new POI for a bakery with "wheelchair": yes and "toilets:wheelchair": no. The log output shows that the API did not receive the toilet information:
{
  "city"=>"Berlin",
  "housenumber"=>"60",
  "lat"=>"52.50921011145839",
  "lon"=>"13.29678519821835",
  "name"=>"Ihr Frischebäcker",
  "phone"=>"",
  "postcode"=>"14057",
  "street"=>"Suarezstr",
  "type"=>"fast_food",
  "website"=>"",
  "wheelchair"=>"yes",
  "wheelchair_description"=>""
}

This seems to be an issue with the iPhone application only. On Android I can see that toilet_wheelchair is passed correctly.

schultyy avatar Jan 12 '17 11:01 schultyy

Should we open an issue about this on https://github.com/sozialhelden/wheelmap-iphone2/issues ?

Hoverbear avatar Jan 16 '17 09:01 Hoverbear

I will discuss this with @RaphaelHeber , thanks.

holgerd avatar Jan 16 '17 13:01 holgerd

for reference, I reported it here: https://smartmobilefactory.atlassian.net/projects/WHEELMAP/issues/WHEELMAP-282

holgerd avatar Jan 17 '17 10:01 holgerd

State of the iOS App:

  • wheelchair_toilet is send during toilet updates using [/nodes/%@/update_toilet]
  • the toilet state isn't set during complete node updates [nodes/%@/]

tschob avatar Feb 02 '17 12:02 tschob

@tschob @1000miles So this seems a source where the wrong toilet tag wheelchair_toilet is still coming from (see issue #400).

Svenyo avatar Feb 06 '17 14:02 Svenyo

If the iOS app sends toilet_wheelchair it receives the error "error":"Param wheelchair_toilet is missing" during toilet state updates.

Will the backend be updated or should the iOS app use wheelchair_toilet ?

tschob avatar Feb 06 '17 15:02 tschob

Hi @tschob, the correct tag in use is toilets:wheelchair Can you try if the error also occurs with this one?

Svenyo avatar Feb 06 '17 15:02 Svenyo

@Svenyo Yes, the same error occurs.

tschob avatar Feb 06 '17 15:02 tschob

@tschob Do you have an example were the use of the toilet tag wheelchair_toilet becomes visible in the edit history in OSM?

Svenyo avatar Feb 06 '17 15:02 Svenyo

@1000miles Could you give @tschob the necessary information he needs from the backend in order to install the right toilet tag in the iOS App?

Svenyo avatar Feb 06 '17 16:02 Svenyo

@tschob If the iOS App could use wheelchair_toilet that would be good, because Android also uses that identifier already. The Backend takes the value as wheelchair_toilet but makes sure that when data is sent to OSM toilets:wheelchair is used.

schultyy avatar Feb 07 '17 10:02 schultyy

Ok, I'll add wheelchair_toilet to the complete node update and keep it in the toilet update.

tschob avatar Feb 07 '17 10:02 tschob