sozialhelden / wheelmap-classic

:wheelchair: Legacy "classic" wheelmap.org (deprecated)
http://www.wheelmap.org
GNU Affero General Public License v3.0
46 stars 16 forks source link

wheelchair:description does not show up on wheelmap #606

Closed ghost closed 7 years ago

ghost commented 7 years ago

As reported by @ldodds on issue #600

A user doing mapping using the app added a comment to a coffee shop. While the comments were saved to OSM, they are not appearing in the mobile or web versions of Wheelmap.

OSM: http://www.openstreetmap.org/way/452678133 Wheelmap: https://wheelmap.org/en/nodes/-452678133

Let me know if I should file this as a separate report. Am a bit concerned that notes will get overwritten or lost if they're not displaying

From a quick check, this is also true for other nodes, as for example OSM: http://www.openstreetmap.org/way/462307362 Wheelmap: https://wheelmap.org/nodes/-462307362

When adding a comment, this should also be displayed on wheelmap directly.

holgerd commented 7 years ago

Just tested the following:

holgerd commented 7 years ago

It is okay now! https://wheelmap.org/en/nodes/1569218581

holgerd commented 7 years ago

Just tested again and it works:

holgerd commented 7 years ago

Another test, this time with a node with negative ID:

holgerd commented 7 years ago

Just tested: The comment for https://wheelmap.org/nodes/-23453689 neither shows up on the detail page of the Android app.

1000miles commented 7 years ago

Update, 2017-07-18

For now we identified 3 behaviors:

Behavior one: comment does not appear at all on wheelmap.org

Example nodes:

+-----------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+---------------------+
| osm_id    | tags                                                                                                                                                                                                                                     | created_at          | updated_at          |
+-----------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+---------------------+
| -23453689 | ---
amenity: place_of_worship
wheelchair: 'yes'
religion: christian
building: 'yes'
wikidata: Q619821
denomination: protestant
wikipedia: de:Apostel-Paulus-Kirche (Berlin-Sch�neberg)
name: Apostel-Paulus-Kirche
building:levels: '4'
 | 2013-10-03 21:07:39 | 2017-07-18 08:25:26 |
+-----------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+---------------------+
1 row in set (0.00 sec)

Behavior two: comment appears on wheelmap.org on 'edit' click

Example nodes

+------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+---------------------+
| osm_id     | tags                                                                                                                                                                                                                                                                                                                                                                            | created_at          | updated_at          |
+------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+---------------------+
| 1569218581 | ---
addr:city: Berlin
addr:country: DE
addr:housenumber: '31'
addr:postcode: '12047'
addr:street: Friedelstra�e
addr:suburb: Neuk�lln
amenity: restaurant
contact:phone: "+49 30 53 05 12 05"
contact:website: http://chez-dang.com/
cuisine: asian
name: Chez Dang
toilets:wheelchair: 'no'
wheelchair: limited
wheelchair:description: 'Ask for ramp ---- TEST #3 17.7.2017'
 | 2013-08-07 06:54:02 | 2017-07-17 13:48:08 |
+------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+---------------------+---------------------+
1 row in set (0.00 sec)

Behavior three: comment appears on wheelmap.org after a few times reload

Conclusion:

The syncing from wheelmap.org to openstreetmap.org works fine (comment appears shortly on openstreetmap) while syncing from openstreetmap.org to wheelmap.org does not work all the time. Sometimes it needs a click on "edit wheelmap poi" before the comment appears, sometimes it does not appear at all even after many times of reloading.

We need to take a deeper look into what triggers to fetch data from openstreetmap to wheelmap. It could be that we have 2 or more bugs in this ticket.

1000miles commented 7 years ago

Update, 2017-07-25

Observations so far:

  1. When we click on the 'submit' button to update a poi the updated data is sent immediately to openstreetmap which explains why osm always has the newest updated data available quickly.

openstreetmap api call example

curl -v https://api.openstreetmap.org/api/0.6/way/452678133

openstreetmap api response example

*   Trying 193.63.75.100...
* Connected to api.openstreetmap.org (193.63.75.100) port 443 (#0)
* TLS 1.2 connection using TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256
* Server certificate: www.openstreetmap.org
* Server certificate: Let's Encrypt Authority X3
* Server certificate: DST Root CA X3
> GET /api/0.6/way/452678133 HTTP/1.1
> Host: api.openstreetmap.org
> User-Agent: curl/7.43.0
> Accept: */*
>
< HTTP/1.1 200 OK
< Date: Tue, 25 Jul 2017 11:35:53 GMT
< Server: Apache/2.4.18 (Ubuntu)
< Content-Encoding: identity
< Cache-Control: private, max-age=0, must-revalidate
< Vary: Accept-Encoding
< Content-Type: text/xml; charset=utf-8
< Transfer-Encoding: chunked
<
<?xml version="1.0" encoding="UTF-8"?>
<osm version="0.6" generator="CGImap 0.6.0 (24935 thorn-03.openstreetmap.org)" copyright="OpenStreetMap and contributors" attribution="http://www.openstreetmap.org/copyright" license="http://opendatacommons.org/licenses/odbl/1-0/">
 <way id="452678133" visible="true" version="9" changeset="50350214" timestamp="2017-07-17T13:03:06Z" user="johnnnny" uid="3399518">
  <nd ref="4494317089"/>
  <nd ref="4494317093"/>
  <nd ref="4494309561"/>
  <nd ref="4494308223"/>
  <nd ref="1752501953"/>
  <nd ref="4494317089"/>
  <tag k="amenity" v="cafe"/>
  <tag k="building" v="shop"/>
  <tag k="fhrs:id" v="738675"/>
  <tag k="name" v="Mus Coffee House"/>
  <tag k="toilets:wheelchair" v="no"/>
  <tag k="wheelchair" v="limited"/>
  <tag k="wheelchair:description" v="TEST 3 back =&gt; 2017-07-17 15:01:23 +0200"/>
 </way>
</osm>
* Connection #0 to host api.openstreetmap.org left intact
  1. When clicking on the submit button of a poi to update the poi data, these infos are not saved immediately in the wheelmap app but dependent on the UpdateTagsJob to work in order to save the data in the wheelmap app.

This has some drawbacks to not immediately save the data in the wheelmap app but waiting for the delayed job 'UpdateTagsJob' to work, e.g. if the openstreetmap api is not available then we might lose these data in the wheelmap app.

We now need to write tests to find out when and why the data gets lost during the UpdateTagsJob process.

1000miles commented 7 years ago

@holgerd cc @anngreenberg @Hoverbear

Update, 2017-08-04

Current state: