Extension talk:FeedImport

Suggested bug fixes as of 03-June-2008:
Feed items with no description will trigger a PHP Notice of "Notice: Undefined index: description"

Find if ($item["description"]) { replace with if (!empty($item["description"])) {

Suggested bug fixes as of 10-August-2007:
To avoid MAGPIE_DIR already defined error, at line 44 replace define('MAGPIE_DIR', '/opt/local/lib/php/magpierss/'); with if (!isset(MAGPIE_DIR)) { define('MAGPIE_DIR', '/opt/local/lib/php/magpierss/'); } and to avoid short is undefined error, fix the mistake at line 106: $reverse = isset($args["short"]); should be $short = isset($args["short"]);


 * Your changes have been merged. Thanks for your help. --PhilFry 13:21, 11 August 2007 (UTC)

Version Support
What versions of mediawiki does this work with? I am hoping 1.7.
 * I have only tested it with 1.9 and 1.10 --PhilFry 01:56, 8 September 2007 (UTC)

Bug when using both 'filter'/'highlight' and 'max'
Move line 242 inside the last block.

-- [mailto:jbs36@cs.drexel.edu jbs]

Is there any way to speed up the amount of time it takes for FeedImport to check and display RSS links
I want to increase the time to like 1-2 mins. Any ideas?
 * If you want to reduce the delay between the update of a feed and that change being reflected on the wiki page you might need to change magpierss, as that's doing the caching. --PhilFry 01:56, 8 September 2007 (UTC)
 * Thanks PhilFry. Yeah I'm researching that now.  Any suggestions of where to modify this specifically.  I have the RSS working on my own WIKI and what I am looking to do is have an instant update of New Articles from a specific NAMESPACE on the Wiki.  --Zezek 02:07, 8 September 2007 (UTC)

minor bug fix at line 217
i added "isset($args["date_timestamp"]) and" to the source code available here. I got a a lot of notices like "Undefined index: date_timestamp ..." within my log files before.

Does this work with Bugzilla feeds?
I generate Bugzilla RSS feeds based on queries (e.g., a list of all open bugs for a given release), and want to include them in certain wiki pages. These work fine in the browser, but

|template=Template:RSSTemplate (where  equals the feed url coming from Bugzilla, which is quite long, and Template:RSSTemplate is based on the BBC template from your example) simply results in a link for the feed, but with no feed entries.

The following works fine: http://mmamania.com/feed/. On the other hand, when I try the 'http://www.legalservices.gov.uk/xml/rss/cdsnewsupdates/rss.xml' feed (mentioned in a previous issue on this page), I just get a list of empty bullets. Thanks! -- com^lnssi^roberts^michael 1/10/08

Field "dc_creator" and usage together with News_Channel
Hi, I have two problems, when trying to use the extension:

I tried the following code:

http://newsrss.bbc.co.uk/rss/newsonline_uk_edition/world/rss.xml|dc_creator|charset=UTF-8|max=5|title = none|nodate

With "Template:Blogentry" created like this:







Now I see the linked items with descriptions, without the channel title or date (very good so far). Unfortunately, instead of the creator's name or an empty string there shows up "". Is this something to be set or is there an error?

Second problem: I want to use FeedImport together with the News_Channel extension, which produces a RSS or Atom feed dynamically. E.g. with an URL like this: https://wiki.mpi-cbg.de/wiki/imagepro/index.php/Special:NewsChannel?format=rss20&limit=10&wpSubmitNewsChannelParams=Get+news If I want to implement this feed (which works as a dynamic bookmark in Firefox perfectly), I get an error "Failed to load RSS feed (not array) from https://wiki.mpi-cbg.de/wiki/imagepro/index.php/Special:NewsChannel?format=rss20&limit=10&wpSubmitNewsChannelParams=Get+news "

Thanks for your work. I hope it will work in the end. --Ygramul 08:11, 2 June 2008 (UTC)


 * I get the same error : No author is named, and simply sits in it's place. I guess it may got something to do with the versions of MediaWiki or MagPie. It strikes me as an odd thing, such as the extension not "getting" the author value correctly from the feed. I'm on MW 1.11 --MortenB 09:48, 15 October 2008 (UTC)

Turning Caching Off
It is not mentioned in the documentation and not too easily found for the non-PHP savvy users. If you do not want feeds to be cached edit feedimport.php

Find define('MAGPIE_CACHE_DIR', MAGPIE_DIR . 'cache/'); Add Bellow define('MAGPIE_CACHE_ON', false);

Samll fix vor br
I've seen that there are many feeds taht include that is only cut out and then the text does not look very nice. So I`ve made a small change I added this an but into Template:BR now the text is formated well. Maybe its possible to build something similar for Links and Pictures. Links would be quite easy. With pictures it could be a problem, maybe when using some extension taht allows to insert external images. --DaSch 22:55, 12 June 2008 (UTC)

Assume magpierss installed in a subdirectory by default
A convenient starting config could be to assume magpierss to be installed in extensions/magpierss, and thus define as a default

define('MAGPIE_DIR', dirname(__FILE__).'/magpierss/');

– 88.91.187.186 19:12, 1 September 2009 (UTC)

Cannot modify header information - headers already sent
Can someone help. I installed the extension and I get the following error:

Warning: Cannot modify header information - headers already sent by (output started at /home/content/k/k/m/kkm5848/html/hindupedia/eng/extensions/feedimport/feedimport.php:325) in /home/content/k/k/m/kkm5848/html/hindupedia/eng/includes/WebResponse.php on line 10

Encoding
I've had to add following lines to fix encoding trouble :

Date format / i18n
Rather use wgLang than PHP date function ...

... and ...

Item position
Enable invoke item template to known position of item to be rendered :