c2corg / v6_ui

UI for c2c.org v6
GNU Affero General Public License v3.0
7 stars 12 forks source link

Error 500 with an outing #1099

Closed asaunier closed 7 years ago

asaunier commented 7 years ago

http://c2corgv6.demo-camptocamp.com/outings/93037/fr/voie-plume => Internal Server Error (ditto with the same outing on demov6):

[Sun Dec 04 22:55:14.695016 2016] [wsgi:error] [pid 20886] [remote 10.27.71.4:22303]   File "/var/www/vhosts/c2cassoc_c2corgv6/private/v6_ui/c2corg_ui/templates/outing/view.html", line 135, in render_body
[Sun Dec 04 22:55:14.695022 2016] [wsgi:error] [pid 20886] [remote 10.27.71.4:22303]     ${show_associated_routes(outing)}
[Sun Dec 04 22:55:14.695029 2016] [wsgi:error] [pid 20886] [remote 10.27.71.4:22303]   File "/var/www/vhosts/c2cassoc_c2corgv6/private/v6_ui/c2corg_ui/templates/helpers/view.html", line 280, in render_show_associated_routes
[Sun Dec 04 22:55:14.695036 2016] [wsgi:error] [pid 20886] [remote 10.27.71.4:22303]     ${add_seo_association_links(routes, 'routes')}
[Sun Dec 04 22:55:14.695048 2016] [wsgi:error] [pid 20886] [remote 10.27.71.4:22303]   File "/var/www/vhosts/c2cassoc_c2corgv6/private/v6_ui/c2corg_ui/templates/helpers/view.html", line 273, in add_seo_association_links
[Sun Dec 04 22:55:14.695056 2016] [wsgi:error] [pid 20886] [remote 10.27.71.4:22303]     <%def name="show_associated_routes(document, type='routes')">\\
[Sun Dec 04 22:55:14.695078 2016] [wsgi:error] [pid 20886] [remote 10.27.71.4:22303]   File "/var/www/vhosts/c2cassoc_c2corgv6/private/v6_ui/c2corg_ui/templates/helpers/view.html", line 189, in render_add_seo_association_links
[Sun Dec 04 22:55:14.695085 2016] [wsgi:error] [pid 20886] [remote 10.27.71.4:22303]     <%
[Sun Dec 04 22:55:14.695091 2016] [wsgi:error] [pid 20886] [remote 10.27.71.4:22303] KeyError: 'title_prefix'
dkocich commented 7 years ago

There is a problem with this associated route http://localhost:6548/routes/201889 (UI link also do not work because of missing title). It looks somehow damaged (attributes are almost empty and it does not include any locale), so then we can't get title_prefix and title.

image

asaunier commented 7 years ago

There is a problem with this associated route http://localhost:6548/routes/201889

This route is a "fake" route created to list/associate outings with accidents before the actual xreports were implemented. That kind of "routes" was associated to a "fake" summit named "Incidents & accidents" (because the v5 data structure requires this summit>route>outing hierarchy). The fake summit is not georeferenced.

Route 201889 is named like "chute-de-pierre-de-serac-ou-de-glace-foudre-vent-pre-incident" ("stone or ice fall, thunder, wind almost-incident"). It is available in current demov6: http://www.demov6.camptocamp.org/routes/201889/fr/chute-de-pierre-de-serac-ou-de-glace-foudre-vent-pre-incident Actually this route is broken as well because, as you have reported it, the API provides no title and title_prefix: http://c2corgv6-api.demo-camptocamp.com/routes/201889 Perhaps a bug during the migration?

The associated waypoint ("Incidents et accidents") also crashes: http://www.demov6.camptocamp.org/waypoints/201899/fr/incidents-et-accidents because of the same error with the associated routes helper (and the missing title and title_prefix attributes).

Please note that this fake route and this fake summit no longer exist in v5: http://www.camptocamp.org/summits/201899/fr/incidents-et-accidents http://www.camptocamp.org/routes/201889/fr/chute-de-pierre-de-serac-ou-de-glace-foudre-vent-pre-incident => "not found"

@fbunoz Do you know what has happened to those documents? They have been removed before the v5 has been made read-only because the migration to xreports in v5 was over?

Since those documents no longer exist, perhaps the problem has disappeared as well. To be tested when demov6 data have been updated.

asaunier commented 7 years ago

The demo has been updated, those "incidents/accidents" WP or routes no longer exist. Outing http://www.demov6.camptocamp.org/outings/93037/fr/signal-du-venetier-voie-plume is displayed as expected (no more associations with an "incident/accident" route).

Please reopen the issue if a similar problem is eventually detected.