Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

rssTerminal.html: Fixing the 'null' is null or not an object in rss2.js when viewing the YaCy default Status page http://localhost:8080/Status.html with Internet Explorer feed.xml: copy of feed.rss that helps Internet Explorer also read the Feed - workaround for the fix above Problem is described in the forums and should be fixed better ;-(http://forum.yacy-websuche.de/viewtopic.php?f=6&t=2766&p=20702)

mikeworksad7efe6016db
diff --git a/htroot/api/feed.xml b/htroot/api/feed.xml
new file mode 100644
index 000000000..240028d12
--- /dev/null
+++ b/htroot/api/feed.xml
@@ -0,0 +1,21 @@
+<?xml version="1.0"?>
+<rss>
+
+<!-- rss standard channel -->
+<channel>
+<title>#[channel_title]#</title>
+<description>#[channel_description]#</description>
+<pubDate>#[channel_pubDate]#</pubDate>
+
+<!-- messages -->
+#{item}#
+<item>
+<title>#[title]#</title>
+<link>#[link]#</link>
+<description>#[description]#</description>
+<pubDate>#[pubDate]#</pubDate>
+<guid isPermaLink="false">#[guid]#</guid>
+</item>
+#{/item}#
+</channel>
+</rss>
diff --git a/htroot/rssTerminal.html b/htroot/rssTerminal.html
index e08591f79..5da249751 100755
--- a/htroot/rssTerminal.html
+++ b/htroot/rssTerminal.html
@@ -123,7 +123,14 @@ function idlepingExec() {
}
function load() {
- getRSS("/api/feed.rss?count=80&set=" + set + "&requestCount=" + requestCount + "&time=" + (new Date()).getTime());
+ /* Check for Internet Explorer to use feed.xml instead of feed.rss fixing a problem with reading from the RSS Feed file which results in a null reference */
+ /* Problem is described in the forums and should be fixed by changing the MIME-Type for .rss files in the YaCy HTTPd */
+ if (navigator.appName=="Microsoft Internet Explorer")
+ {
+ getRSS("/api/feed.xml?count=80&set=" + set + "&requestCount=" + requestCount + "&time=" + (new Date()).getTime());
+ } else {
+ getRSS("/api/feed.rss?count=80&set=" + set + "&requestCount=" + requestCount + "&time=" + (new Date()).getTime());
+ }
requestCount++;
}