ikiwiki/doc/bugs/osm_linkto__40____41___usag...

18 lines
999 B
Plaintext
Raw Normal View History

2012-08-03 05:52:27 +02:00
[[!template id=gitbranch branch=anarcat/master author="[[anarcat]]"]]
2012-04-16 02:25:39 +02:00
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:
GET http://mesh.openisp.ca/map/pois.kml/ 404 (Not Found)
2012-05-12 17:00:47 +02:00
Indeed, that URL yields a 404. The proper URL is <http://mesh.openisp.ca/map/pois.kml>. --[[anarcat]]
2012-08-02 22:43:26 +02:00
## Proposed solution
The problem seems to be caused by `urlto()` being called for the `osm` directive before the generated files are registered with `will_render()` from the `waypoint` directive. Proposed patch adds a function that is called from the `preprocess` hook for both directives that registers the files.
Here is a [[patch]] to IkiWiki/Plugin/osm.pm: <https://reseaulibre.deuxpi.ca/0000-Fix-incorrect-URL-pointing-to-the-generated-waypoint.patch>
2012-08-02 22:43:26 +02:00
--[[deuxpi]]
2012-08-03 05:52:27 +02:00
I confirm the patch works, and I added it to my master branch. --[[anarcat]]