]> sipb.mit.edu Git - ikiwiki.git/blob - doc/bugs/osm_linkto__40____41___usage_breaks_map_rendering.mdwn
Merge remote-tracking branch 'intrigeri/fix_diffurl_vs._cgit'
[ikiwiki.git] / doc / bugs / osm_linkto__40____41___usage_breaks_map_rendering.mdwn
1 [[!template  id=gitbranch branch=anarcat/master author="[[anarcat]]"]]
2
3 Under some circumstances that remain unclear to me, the usage of `urlto()` in the revised version of the [[plugins/osm]] plugin break the map totally. The javascript console in Chromium tells me the following:
4
5     GET http://mesh.openisp.ca/map/pois.kml/ 404 (Not Found)
6
7 Indeed, that URL yields a 404. The proper URL is <http://mesh.openisp.ca/map/pois.kml>. --[[anarcat]]
8
9 ## Proposed solution
10
11 The problem seems to be caused by `urlto()` being called for the `osm`
12 directive before the generated files are registered with `will_render()`
13 from the `waypoint` directive. Proposed patch adds a function that is
14 called from the `preprocess` hook for both directives that registers the
15 files.
16
17 Here is a [[patch]] to IkiWiki/Plugin/osm.pm: <https://reseaulibre.deuxpi.ca/0000-Fix-incorrect-URL-pointing-to-the-generated-waypoint.patch>
18
19 --[[deuxpi]]
20
21 I confirm the patch works, and I added it to my master branch. --[[anarcat]]
22
23 > [[applied|done]]. Thanks guys. --[[Joey]]