[OSM-dev] RSS Feed image URL incorrect
Ben Marchant
ben_marchant at hotmail.com
Wed Dec 16 03:08:22 UTC 2015
Hey all:
Been poking through the osm rails code and found an issue with the wrong URL for the map_map-rss2.0.png image. It hard codes the URL to be http://www.openstreetmap.org/images/mag_map-rss2.0.png which comes back with a File not found error because there is no route in config/routes.rb for /images/. So making the following change (did a git diff on my change) will fix the error. Since I'm not a dev on the repository I thought I'd email in the solution, though I'd love to contribute in any way that I can.
http://www.openstreetmap.org/diary/rss
Source for the above link:
<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:georss="http://www.georss.org/georss">
<channel>
<title>OpenStreetMap diary entries</title>
<description>Recent diary entries from users of OpenStreetMap</description>
<link>http://www.openstreetmap.org/diary</link>
<image>
<url>http://www.openstreetmap.org/images/mag_map-rss2.0.png</url>
<title>OpenStreetMap</title>
<width>100</width>
<height>100</height>
...
Thanks,
Ben Marchant
github.com ID: bmarchant
diff --git a/app/views/diary_entry/rss.rss.builder b/app/views/diary_entry/rss.rss.builder
index 35f0502..61c51b1 100644
--- a/app/views/diary_entry/rss.rss.builder
+++ b/app/views/diary_entry/rss.rss.builder
@@ -8,7 +8,7 @@ xml.rss("version" => "2.0",
xml.description @description
xml.link url_for(:action => "list", :host => SERVER_URL)
xml.image do
- xml.url "http://www.openstreetmap.org/images/mag_map-rss2.0.png"
+ xml.url path_to_image("mag_map-rss2.0.png")
xml.title "OpenStreetMap"
xml.width "100"
xml.height "100"
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20151215/65790d10/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: RSS-Error.png
Type: image/png
Size: 91749 bytes
Desc: not available
URL: <http://lists.openstreetmap.org/pipermail/dev/attachments/20151215/65790d10/attachment-0001.png>
More information about the dev
mailing list