Extension talk:RSS/LQT Archive 1

how to use the Extension
Hi, I'm new in using the extensions and I don't Know where to put the code " http://rss.slashdot.org/Slashdot/slashdot|charset=UTF-8|short|date|max=5 ". I've installed the extension but do't know how to use. really I did't understand the example, also i got "This is not a valid entry point." when i call rss.php from my browser window>

any one help please, Thanx. --Gerges 11:52, 31 August 2009 (UTC)

Create a blog with agregated content
Hi, on Design Platform we would like to make a page that agregate the updates from different blogs. Currently we use this extension and display the titles for each blog. Well... The section is becomming huge. What we would like to do is like a blog with would display the news (first part of the text) from each blog article in order. Do you think it is possible someaway ? Thanks ! --Thibho 23:37, 10 July 2009 (UTC)

Cannot modify header information
I installed the RSS Extension and if I want to use it, I get the error: Warning: Cannot modify header information - headers already sent by (output started at/kunden /140041_45136/cr-eu/start/ticopedia/extensions/rss.php:1) in /kunden/140041_45136/cr-eu/start /ticopedia/includes/WebResponse.php on line 10

I use Mediawiki-Version 1.13 (www.ticopedia.de)

What should I do ? What I have to change in teh rss.php or in the webResponse.php ?? --88.78.37.161 17:27, 30 November 2008 (UTC)

Incompatibility with MW 1.12
Hi all, I have an incompatibility using this plugin, it produces a SQL DB error... It says that the table mw_cur doesn't exist. OK, it was the fix that I did not applied correctly...--Rmatt 14:45, 28 March 2008 (UTC)

Internationalisation problems
When I try to read a feed on french, UTF-8 encoded, I have a problem. If I add the parameter charset=UTF-8 the text is cutten after the first exotic character (é, à...) and the rest of the text do not appear.

If I remove this parameter theses characters all well processed, but the apostrophs (') are replaced by (?). Any ideas ? I did not install any additional iconv library.

Misformatted text
I'm not sure if it's rss.php or the Magpie parser at fault, but RSS feeds with embedded &lt;pre&gt;&hellip;&lt;/pre&gt; tags are not displayed properly. All the newlines are stripped out and replaced with spaces, which ruins the formatting. &mdash;Psychonaut 14:23, 7 April 2008 (UTC)

Notitle
Hi, great work, however I miss "notitle" option when showing RSS feed. I have pages where I define RSS feed and pages where I show various feeds. Always showing source of RSS feed (name of the site + mediawiki page) is really annoying. It would be great if "notitle" option is inclueded into next ver.

--89.212.65.33 09:35, 14 April 2008 (UTC)

Formatting of feeds
This is a great extension but for some reason I can't seem to get my wordpress feed to work. I'm using a wordpress category feed http://ehealth.oerc.ox.ac.uk/?feed=rss2&cat=3. is this formatting no good for your extension. I'm getting the failure message.

Text Editors
I tried using nano to create the rss.php and the extension just won't work! Using Vi did the trick. --202.52.76.99 02:33, 5 June 2008 (UTC)

XML
how can i add a feed like this: http://www.asdfasdfasd.com/news/feed.xml? Bennylin 04:00, 7 June 2008 (UTC)

Chinese language Feed Problem
When I used it to read a Chinese Simplified Language Feed (the charset is UTF-8) It doesn't work. What I saw are NOT normal words

Update: This Problem is resoloved. Just add a line to rss.php : define('MAGPIE_OUTPUT_ENCODING', 'UTF-8');

Proposed Patch (error handling)
sometimes, feeds aren't as clean as they should be. the rss extension was throwing php errors at me, so I added some checks to make sure we have the feed (and date in it) correctly from magpie:

Help?

 * I have been having trouble getting this patch to work. It was clear where to put the bit after feed fetch, but this 'after line 138' isn't as obvious. Is that line 138 before or after adding the code at line 108? Could someone specify the code above and below where you insert this patch? - Helen

I can't get the parameters to work.
On my wiki site the RSS works, but I cannot get the "max=5" entries to work. I get the error message: "Error: It's not possible to get max=5." The code I'm using is: http://www.webaddress.com|max=5. Please offer suggestions if you have any. Thanks! 169.253.4.21 18:22, 25 September 2008 (UTC)

Using magpie behind a proxy
I have mediawiki 1.4 set up on our intranet behind a proxy server. No matter what I try, I can't get magpie to pull any feeds through our proxy. I've changed the Snoopy.class.inc file to what I *believe* are the appropriate settings, but still I get an error like "Failed to load RSS feed from http://www.mediawiki.org/w/index.php?title=Special:RecentChanges&feed=rss!" A working sample of Snoopy.proxy.inc and/or any other tips to get this working would be very helpful. Thanks!! 20:09, 2 January 2009 (UTC)
 * Probably you are behind a Microsoft ISA proxy that needs NTLM authentication. If this is your case, just install NTLMAPS (you'll need Python), then change the Snoopy.class.inc file (proxy_host and proxy_port variables) to point to your new local NTLMAPS proxy and finally configure your NTLMAPS (the file runserver.bat must have the correct path to python.exe and the following parameters must be configured in the file server.cfg: NT_DOMAIN, USER, PASSWORD</tt>, PARENT_PROXY</tt>, PARENT_PROXY_PORT</tt>). I've tested here and it worked perfectly. My current configuration is: Mediawiki 1.15.1, PHP 5.2.9, Apache 2.2.11, NTLMAPS 0.9.9, Python 2.6.4. --Felix Almeida 200.169.115.32 21:36, 13 November 2009 (UTC)

Internationalisation problems still yet and with MW 1.14
Hi people,

I have a problem with my french feeds. They are trimmed after every character like é, è, à or even "'".

Furthermore, it is showing a problem as text on the top of the page, which is very odd, showing :

You can check at : FFE-PS Localité:Berlin

Thanks for your support and the great work already done ! --Rmatt 15:39, 1 March 2009 (UTC)

HTML stripped out
I've tried this extension (and several of its predecessors) on a Fedora 9-based MediaWiki 1.13.3 installation. Displaying the short version of a feed is fine, but the long version is consistently stripped of html formatting -- specifically, less-than and greater-than characters are completely stripped out, so the resultant page has things such as "Line one br /Line two" (where the br / should be a break tag).

I'm obviously missing something. Any ideas what? --Chris Tyler 16:26, 2 March 2009 (UTC)

Perhaps, this libxml2 bug? http://bugs.php.net/bug.php?id=45996 --Ashawley 04:45, 22 April 2009 (UTC)

list of Mediawikis having the rss extension installed
MattisManzel 19:58, 10 April 2009 (UTC): I'm looking for a list of Mediawikis with the rss extension installed or a clever query that finds many of them. Somebody knows?

MattisManzel 11:21, 17 April 2009 (UTC): I started one on odd-wiki-hive - 'wiki-net' - Mediawikis with rss extension.


 * I tried the extension here: http://www.healthplusplus.com/wiki/MedlinePlus_Health_News

Any way to keep feeds from being cut/trimmed?
Is there any way I can keep text from the feeds from being cut off after a certain number of characters? -Swooshy

Unescape HTML special characters
The HTML entities need to be unescaped. I had better luck with the following patch:

--- rss.php~   2009-04-21 19:57:57.000000000 -0400 +++ rss.php    2009-04-22 02:02:54.000000000 -0400 @@ -151,6 +151,7 @@                #Build description text if desired if ( $item['description'] ) { $text = trim( iconv( $charset, $wgOutputEncoding, $item['description'] ) ); +               $text = html_entity_decode($text); #Avoid pre-tags $text = str_replace( "\r", ' ', $text ); $text = str_replace( "\n", ' ', $text );

Or has something changed? --65.183.152.86 06:18, 22 April 2009 (UTC)

Cache
It's maybe a good idea to add a cache dir. In file rss.php I put after line require_once('extensions/magpierss/rss_fetch.inc'); these two: define('MAGPIE_CACHE_DIR', './rsscache'); define('MAGPIE_CACHE_AGE', 30*60); // 30 minutes

The change permission for the rsscache directory, same as the images directory. By default, on my wiki, it wrote to the ./cache dir which is use by the mediawiki for its filecache.

- 129.194.8.73 18:14, 17 June 2009 (UTC)

License Discussion
If you are one of the authors who edited this extension, please join the discussion about licensing to include it in a Fedora package User_talk:Mutante#RSS_Extension_Licensing. Mutante 23:30, 8 July 2009 (UTC)

Bug: Server logs PHP warnings if upstream rss feed doesn't contain 'date', 'description'
http://blog.illogicopedia.org/feeds/posts/default|short|max=8 is included from a template on the http://illogicopedia.org main page.

As the extension finds no date stamps and no one-paragraph description texts for the individual items in this feed (which appears to be Blogspot-generated), the server log is a mess of PHP warnings:


 * PHP Notice: Undefined index: description in extensions/rss/rss.php on line 127
 * PHP Notice: Undefined index: pubdate in extensions/rss/rss.php on line 187
 * PHP Notice: Undefined index: dc in extensions/rss/rss.php on line 189

The date stamps for each item, if not present, are displayed to the user as "January 1, 1970" if the 'date' option happens to be enabled in wikitext. This is based on the current version (v1.5 of this RSS extension) running under MediaWiki 1.16alpha. --Carlb 21:28, 30 August 2009 (UTC)

Had the same Problem
Confirmed.

Happened to me on:
 * MediaWiki 1.13.3
 * PHP  5.2.10-pl1-gentoo (cgi-fcgi)
 * MySQL 5.0.76-log

I used this solution:
 * http://www.mediawiki.org/wiki/Extension_talk:RSS#Proposed_Patch_.28error_handling.29

Before that i used an even simpler solution, i commented out all lines with pubdate in it as i am no php-coder.

85.179.25.48 12:14, 19 September 2009 (UTC)


 * Same here on my MW 1.16a for both; the error message and the wrong date format ("January 1, 1970") for some feeds (which read a correct date in e.g. netvibes). Any solutions except disabling them? --Subfader 22:35, 9 December 2009 (UTC)
 * Using checking if isset now: e.g.

--Subfader 21:27, 10 December 2009 (UTC)

HTTPS / SSL
I had to modify the magpierss-0.72 included PHP file Snoopy.class.inc $curl_path</tt> variable to point to the correct location of the curl binary executable on my server in order to get the extension to feed from a WordPress blog with an HTTPS URL. Works great now. Thanks! &mdash;128.183.226.220 13:18, 4 December 2009 (UTC)

Usage in templates?
I can't seem to be able to use the rss tags in templates?: Template: Result: Failed to load RSS feed from ! --Subfader 02:35, 10 December 2009 (UTC)


 * Try  instead.  Also, try calling the template with the 1= parameter   -- this is necessary if a URL contains special characters incompatible with a template call. LobStoR 13:25, 10 December 2009 (UTC)


 * Thanks, totally forgot about it. This should be implented for modern MW versions. --Subfader 22:09, 10 December 2009 (UTC)

Fetching the enclosure tag
Fetching the enclosure tag was never implented to the outdated MagicpieRSS (last version is from 2005). So there was a fix for rss_parse.inc here. But this extension only makes use of rss_fetch.inc so that might explain why I failed? Did anybody manage to add the hotfix to this extension? --Subfader 03:49, 12 December 2009 (UTC)

How to modify the length of the description?

 * filed as bug 30377 Suggestion: add a new parameter to limit the number of characters when rendering the channel item 

hi, I'd like to have only 50 characters. How can I change it?

thanks

andy


 * Something like this:

preg_replace('/^(.{150}).{3,}(.{25})$/us', '$1 ... $2', $item['description']);
 * Play around with the numbers and you'll see. --Subfader 21:48, 5 March 2010 (UTC)


 * Where can I insert this in rss.php? 80.218.143.73


 * I changed rss.php a lot so I didn't check it, but it should work like this: Replace

if ( $item['description'] ) { $text = trim( iconv( $charset, $wgOutputEncoding, $item['description'] ) ); with if ( $item['description'] ) { $shortdesc = preg_replace('/^(.{150}).{3,}(.{25})$/us', '$1 ... $2', $item['description']); $text = trim( iconv( $charset, $wgOutputEncoding, $shortdesc ) );
 * This will shorten the description text to [150 chars ... 25 chars]. --Subfader 19:15, 16 March 2010 (UTC)

Some feeds work, and some don't!
I have developed a private wiki based on MediaWiki 1.15.1, PHP 5.2.6 and MySQL 5.0.89. I have four RSS feeds on my Main Page, two work and two do not.

The two that work use the code:

- http://www.flightglobal.com/feed/3d4b1ec9-34e2-485b-a2f0-bf636bb694b1/flight-ccp/airlines.xml|charset=UTF-8|short|max=10

- http://www.airbus.com/en/utilities/rss.jsp|charset=UTF-8|short|max=10/

The two that don't work use the code:

- http://www.caa.co.uk/RSS/RSS_18.xml|charset=UTF-8|short|max=10

- http://boeing.mediaroom.com/index.php?s=43&pagetemplate=rss&category=683510|charset=UTF-8|short|max=10

The two that don't work, correctly retrieve the feed items, but when a feed item is chosen, it issues a URL in which all the parameters are without a proceeding '&', and are therefore returning a 'file not found'.

What to do? Cheers, Richard McDonald Woods 17:43, 26 February 2010 (UTC)

Heavy server load
I have a page on my wiki where I list 40 RSS feeds with 2 items per feed. I don't use cache since I need to be sure I receive them as fresh as possible when I open the page. Loading this page takes ~30 seconds and the srever CPU raises from ~3% to 12%. Anybody got an idea how to reduce the load? I use this extension together with magpierss 0.51. --Subfader 13:55, 28 February 2010 (UTC)

Trouble aggregating from google's calendar
I have trouble with displaying date from google calendar - the plugin displays 01.01.1970, instead of date, shown in XML. How to fix it? where to look? :)

Dates from RSS Feeds are not correct (they are either in UTC or GMT time)
If you're using magpierss with a WIKI, and the date and time aren't coming through as expected (e.g. in UTC or GMT instead of your local date/time e.g. NZDT), the suggested LocalSettings.php settings may be conflicting with your Local Time Zone.

Suggestion from Manual:Timezone is below: $wgLocaltimezone = "Pacific/Auckland"; $oldtz = getenv("TZ"); putenv("TZ=$wgLocaltimezone"); $wgLocalTZoffset = date("Z") / 60; putenv("TZ=$oldtz");
 * 1) Versions before 1.7.0 used $wgLocalTZoffset as hours.
 * 2) After 1.7.0 offset as minutes

However, to get this extension to correctly display the date/time the RSS feeds were created, remove all of the above and just use: $wgLocaltimezone = "Pacific/Auckland"; $wgLocalTZoffset = date("Z") / 60;

It fixes the incorrect displaying of RSS feed dates and times. All history pages are correctly stamped also (e.g. upload, deletion, recent pages logs)

filter option is not working on MW 1.14
I am using mediawiki 1.14. I have installed Rss extension and found that The filter and filterout option is not working. I tried below code and it just returned top 2 stories from the blog, same result for filterout option: http://blog.symbian.org/feed|filter=composing|max=2 Any idea how to fix this problem? Thanks

Link string
Is there a way to change the string that links back to the original item after the description? Currently it looks like [?], but I'd like to change it to some text. Thanks! Alexkozak 18:39, 3 August 2010 (UTC)

nothing is cached
I installed the extension, and created the cache folder, set it be writable by wm, and created a page with rss, the rss was show, but nothing under the cache folder.

NoFollow tag
Is it possible to add the NoFollow tag to external links?

Problems with HttpRequest in RSSFetch.php
fixed - I finally read the manual and noticed that this extension needs MW 1.16+ to run. MW Versions before this will not work due to different implementations of the includes/HttpFunctions.php code. Mr3641 07:46, 27 October 2010 (UTC)

I can't get the extension to work due to errors in the _fetch_remote_file method of RSSFetch.php. In particular, I get a: exception 'HttpException' with message 'HttpRequest::factory expects parameter 2 to be long, array given' in /usr/share/mediawiki-1.15.3/extensions/RSS/RSSFetch.php:199 which indicates that the method call isn't correct. A few lines down in this method, I also see calls to $client->setUserAgent and $client->execute, which are methods that don't show up in the HttpRequest manual (http://usphp.com/manual/en/class.httprequest.php). Is there another library for HttpRequest that I should be using? I'm working with mediawiki 1.15 on ubuntu 10.4, using php 5.3.2 and PECL_HTTP. Mr3641 07:48, 25 October 2010 (UTC)

hacked in a fix for date formatting (from google feeds)
I see above there are a few people that noted date parsing problems, likely with older releases. I just spent some time hacking through and fixing it to work as much as I needed. Based on what I can see in the svn history, the release I was using was somewhere around r69779, but doesn't seem to exist as I have it downloaded in the repository.

http://gist.github.com/648441

The other caveat I have is that this issue arose from relying on PHP's strtotime to parse RSS pubDate elements. However, an RSS 2.0 pubDate is an RFC 822 date, and it doesn't seem that strtotime can handle 'UT' for the 'GMT' alias per RFC822, Section 5.1. This seems like a special case that probably needs to be handled.

Another special case is the use of 'updated' for atom feeds, which doesn't seem to exist in the current svn, but was somehow handled outside the calling of 'normalize' in the older version I modified. Which caused problems of its own. However, I don't see any Atom handling in the current version.

Thanks for providing this extension! --opellotalk 05:31, 27 October 2010 (UTC)

Fatal Error:
I'm not sure what I did wrong, but I am getting this error: Fatal error: Call to undefined method CurlHttpRequest::getStatus in /wiki/extensions/RSS/RSSParser.php on line 296.. I installed it properly, not sure what gone wrong. Thanks!

Any help?Achilles2010 12:37, 12 November 2010 (UTC)

Any updates? Another person's experiencing the same problem... Achilles2010 16:43, 14 November 2010 (UTC)

Second Fatal Error Report
Fresh Install MediaWiki 1.16.0; Fatal error: Call to undefined method CurlHttpRequest::getStatus in /w/extensions/RSS/RSSParser.php on line 295

This needs to be fixed ASAP! And where are the prior functional versions?!!? I can only find the current broken version....

173.54.196.218 23:55, 13 November 2010 (UTC)


 * Version 1.8 requires MW 1.17+ according to the infobox. --Subfader 19:26, 14 November 2010 (UTC)


 * I noticed that, where can I get a copy of the old (functional) version compatable with 1.16, I can't find anything but the latest build. Civilwartalk 03:46, 15 November 2010 (UTC)

A workaround: You can get an older version from here: http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/RSS/

Use a CLI subversion client:
 * 1) apt-get install subversion

Get an older version of RSS:


 * 1) svn co -r r71177 http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/RSS

Move it to the extension directory:


 * 1) mv RSS /usr/share/mediawiki/extensions/


 * 1) vi /etc/mediawiki/LocalSettings.php

Place the following text in your LocalSettings.php file: require_once("$IP/extensions/RSS/RSS.php");

(Make sure there's a semicolon at the end of that line)

This revision 71177 works with MediaWiki 1.15.1. A better option could be to upgrade MediaWiki itself ... Muuh 12:13, 16 November 2010 (UTC)


 * In the end I ended up reverting back to a prior version of RSS: http://www.mediawiki.org/w/index.php?title=Extension:RSS&oldid=328741 I just can't seem to get the latest version working error free in 1.16.0, I have no idea where one gets 1.17.0, that's beyond my capability at this time, 1.16.0 is the latest stable version, I do not use beta products. I would like to know why RSS went from a stable extension to a beta extension... This method of improving an extension with no easy access to prior versions hard to work with. 24.136.109.218 18:33, 16 November 2010 (UTC)


 * Agree. That one worked, thanks 24.136.109.218. :) Achilles2010 17:07, 17 November 2010 (UTC)

Stray characters breaking your DOM parser? I've got code for you.
If anyone's having trouble with stray characters getting into their feeds and breaking the DOM parser, it might be worth it to check out this code I wrote: http://pastebin.com/wTie504i

// In extensions/RSS/RSSParser.php in around line 330: // Strip invisible control characters from the raw XML string. $safe_xml = preg_replace("/\p{C}/", "", $raw_xml); wfSuppressWarnings; $this->xml->loadXML( utf8_encode ( $safe_xml ) ); // Be sure to re-encode as UTF-8. wfRestoreWarnings;

I don't have SVN access, nor do I really care to commit to that, but maybe someone should give the code a once-over and add it to the repo.

CryptoQuick 01:21, 6 June 2011 (UTC)

misplaced templates?
Info: MediaWiki	1.17.0, PHP	5.2.17 (cgi-fcgi), MySQL	5.1.56-community-log. installed RSS from extensions downloader (RSS-MW1.17-r77687.tar.gz) and untarred on my server. Using standard wiki language: http://feeds.nytimes.com/nyt/rss/HomePage. Page doesn't throw any errors, but it is just blank. My MW install is relatively new--I am just missing some templates somewhere?

Failed to load RSS feed
Does it work at all? Failed to load RSS feed:

http://rss.slashdot.org/Slashdot/slashdot --Subfader 14:25, 23 July 2011 (UTC)
 * Per 30028, yes it does. Reedy 14:33, 23 July 2011 (UTC)


 * Same issue happening here. or any RSS link gives a blank page. When no link is given, it at least shows 'Not a valid URL:' -- MechanicalApe 18:41, 30 July 2011 (UTC)

How to format the date?
Is there any way to format the ouput of the date? --Pintman 12:07, 31 August 2011 (UTC)
 * That can be done in the template with the #time parser --DaSch 14:21, 31 August 2011 (UTC)