Extension talk:RSS

Jump to navigation Jump to search

About this board

It is preferred that you open a regular bug report for new issues.
Check the manual page for the new parameters $wgRSSUrlWhitelist and $wgRSSUrlNumberOfAllowedRedirects.
Check the archived version of the page for problems which has been reported with earlier versions.

Along with your question, please indicate versions from your wiki's version page

checklist: MediaWiki components
check your wiki's version page

for component

what version do you run?
MediaWiki version and revision
RSS extension version and revision

Please study the MediaWiki debug manual. Before reporting here, please always check your logfiles for obvious problems such as missing files due to wrong include paths and so. Add the following line temporarily to your LocalSettings.php and try to log in with OpenID

$wgDebugLogFile = "/tmp/{$wgSitename}-debug.log"; // my wiki's debug logfile - comment the line after use
Warning: Make sure to have the debug file unaccessible for the public, and via the web, as the debug file may contain confidential information such as cookies.
It is preferred that you open a regular bug report for new issues.

Feed is not in the whitelist -- Where is RSS.php?

8 (talkcontribs)


I've recently installed the extension and have been puzzled as to where I find the configuration file. I've been reading the manual and it says something about RSS.php, yet when I search through the extension folder, I can't find it. Where do I configure the extension? I need to add something to the whitelist.

Thank you ahead of time!

CayceP (talkcontribs) (talkcontribs)

Hey, thank you for the heads up!

So far the only setting I wanted to mess with was the whitelist, and I came up with

$wgRSSUrlWhitelist = ('URL');

I still get the "not whitelisted" error message. Am I missing something?

CayceP (talkcontribs)

That is odd. Does $wgRSSUrlWhitelist = ( "*" ); work? (talkcontribs)

No luck, sadly! :(

CayceP (talkcontribs)

Odd. Which MediaWiki version are you currently using? Does the extension show up in you SpecialPage:Version page?

I would recommend to remove the extension from your FTP and download the correct corresponding version of the extension once more and install it again. Be sure to use the correct code in your LocalSettings.php according to your wiki version. Also run http://yourwikis.address/w/mw-config/ once to make sure you installation's data base is up-to-date (I don't think this Extension changes any tables but you might have installed something else that did and where the tables weren't updated properly which can lead to strange side effects).

Also, you please paste the $wgRSSUrlWhitelist = ('URL'); entry that didn't work? (talkcontribs)

Heya, here's my version information!

What actions should I take based on this info? I'm going to see if removing and reinstalling works, but any pointers outside of that would be super appreciated.

Thank you again for your help and patience, I really appreciate it!

Ah, so the entry I used was $wgRSSUrlWhitelist = ( "*" );

CayceP (talkcontribs)

Hmm. Did you have any luck with reinstalling the extension and providing your RSS feedurl in $wgRSSUrlWhitelist = ( "*" );? Also could you please post the URL to the RSS feed you try to display so I can test if it works for me?

Reply to "Feed is not in the whitelist -- Where is RSS.php?" (talkcontribs)

For people like me who always need concrete examples, this is the code:

<rss max="6">https://blog.wikimedia.org/feed/</rss>

The example is shown here: User:Base/RSS test 1

Wikinaut (talkcontribs)

Danke! Thanks!

Reply to "Good examples"

Could I use {{{1}}} in RSS feed URL ?

Alexandroslee (talkcontribs)

how could I use a dynamic RSSfeed URL ?

I had a template such as template:newsfeed

then call as {{template:newsfeed|123456}}

and I setup template:newsfeed like this

<rss max="6" template="newsfeed">www.abc.com/rssfeed?no={{{1}}}</rss>

but seem the RSSfeed URL won't work {{{1}}} ?

then change to direct number like this

<rss max="6" template="newsfeed">www.abc.com/rssfeed?no=123456</rss>

the news show ,

but I need the dynamic RSSfeed URL

how could I use a dynamic RSSfeed URL ?

This post was hidden by Alexandroslee (history)
This post was hidden by Alexandroslee (history)
Alexandroslee (talkcontribs)

there is templet:$1 of MediaWiki:Rss-item

How can i do ?

It4history (talkcontribs)

I solved this problem by hacking code in the file RSSHooks.php

I added at line 27 just after "public static function renderRss..."

$input = $parser->replaceVariables($input);

Reply to "Could I use {{{1}}} in RSS feed URL ?"

could we have a Parser Tag for Templates of RSS

Alexandroslee (talkcontribs)

Just like embed video have Parser Tag for Templates like this

{{#evt: service=youtube |id=https://www.youtube.com/watch?v=pSsYTj9kCHE |alignment=right }}

so I could setup a template like this
Template:embedvideo as

{{#evt: service=youtube |id=https://www.youtube.com/watch?v={{{1}}} |alignment=right }}

then I could call like this


if rss could have the Parser Tag for Templates

maybe we have one template

Template:cnn_rss as

{{#rss: max=10 |id=http://rss.cnn.com/rss/{{{1}}} |..... }}

so we would call like




could we?

Reply to "could we have a Parser Tag for Templates of RSS"

the elements "comments" seems can't pass the url ? what's worng I made?

Alexandroslee (talkcontribs)

I made a templet

[{{{comments}}} {{{author}}}] ''' [{{{link}}} {{{title}}}] ''' {{{description}}}

the elements :"link" pass the url as well, but the elements "comments" seems can't pass the url ? what's worng I made?

Alexandroslee (talkcontribs)


like this ?

CayceP (talkcontribs)

I think {{{comments}}} is not a valid call for the parser.

Alexandroslee (talkcontribs)

Oops! how could call the url pass throuth comment ?

CayceP (talkcontribs)

No idea. Probably by either manipulating the corresbonding .php file in your installtion yourself or by opening a change request in Phabricator.

Reply to "the elements "comments" seems can't pass the url ? what's worng I made?"

RSS.php not in git repo

Summary by CayceP

After install version 1.27 all problems had been solved!

JimHu (talkcontribs)

I'm guessing the installation section needs to be modified for those running <1.27?

CayceP (talkcontribs)

Yes, the file seems to be missing in the latest repository version. I tried to use the RSS.php from the version before but that threw an fatal exception in my installation. Couldn't get the lastest version to work at all in my 1.29.x installation.

Alexandroslee (talkcontribs)

Would you mind telling me how to find RSS.php ?

CayceP (talkcontribs)
Alexandroslee (talkcontribs)

Thanks a lot!

Alexandroslee (talkcontribs)

how to setup $wgRSSUrlWhitelist ?

show error message

"rss-empty-whitelist": " \"$1\" 不在允許訂閱白名單中。此白名單並無允許訂閱之 URL。",

"rss-empty-whitelist": "\"$1\" is not in the whitelist of allowed feeds. There are no allowed feed URLs in the whitelist.",

but I don't know how to setup $wgRSSUrlWhitelist ?

Alexandroslee (talkcontribs)

which file I could setup $wgRSSUrlWhitelist ? or when I edit the content?

URL whitelist of RSS Feeds, the whitelist is empty by default and no URLs are allowed. If there are items in the array, and the used feed URL isn't in the array, it will not be allowed.

Use array( "*" ) if you as admin want to allow anyone to use any feed Url.

CayceP (talkcontribs)

you need to define the array of allowed urls of $wgRSSUrlWhitelist in your wikis LocalSettings.php

Alexandroslee (talkcontribs)

seem setup in RSS.php but I still can't find it ?

is the first time seem there is RSS.php but the second time , disappear ?!

Alexandroslee (talkcontribs)

only version 1.27 has RSS.php

Alexandroslee (talkcontribs)

install version 1.27 had solve my problem! Thanks a lot !

Alexandroslee (talkcontribs)

Where can I edit the template MediaWiki:Rss-item which determines which item elements are used

{{ MediaWiki:Rss-feed \
 | title = {{{title}}} \
 | link = {{{link}}} \
 | date = {{{date}}} \
 | author = {{{author}}} \
 | description = {{{description}}} }}
CayceP (talkcontribs)

Looks for an article/page on your mediawiki called MediaWiki:Rss-item , if there is none, create a page/article and copy and paste the template content from your post and your should be done.

Alexandroslee (talkcontribs)

Thank you! after install version 1.27 all problems had been solved!

[RESOLVED WORKSFORME] "allow all URLs" wont work

Bawolff (talkcontribs)

Copying from a thead at Project:Support_desk - https://www.mediawiki.org/wiki/Thread:Project:Support_desk/Extension:RSS_-_"allow_all_URLs"_wont_work (Wikinaut asked me to do this so the issues for E:RSS stay organized, and LQT move feature hates me)


one problem solved, the next matter appears. Now I want to add a RSS feed extension to my Wiki. As for the installation part, no trouble. I downloaded it here:


According to the RSS.php I got the newest version from April 24th. Now as I wanted to test with the first feed I used this code:


First, I receive this error:

Set $wgShowExceptionDetails = true; at the bottom of LocalSettings.php to show detailed debugging information.

After refreshing, the error however changes to a more informative matter:

http://blog.wikimedia.org/feed/ is not in the whitelist of allowed feeds. There are no allowed feed URLs in the whitelist.

So I googled and I found what caused it - suprise - the URL wasn't added to the whitelist. I did that now and it looks something like this:

$wgRSSUrlWhitelist = "blog.wikimedia.org/feed/";

This should do it for a start. I'm not even thinking about using another feed, I just want to see those fancy WikiMedia news now. But unfortunatly, they wont appear.

http://blog.wikimedia.org/feed/ is not in the whitelist of allowed feeds. //blog.wikimedia.org/feed/ is the only allowed feed

I tried quite a few things:

* $wgRSSUrlWhitelist = "blog.wikimedia.org/feed/";
* $wgRSSUrlWhitelist = "http://blog.wikimedia.org/feed/";
* $wgRSSUrlWhitelist = "*";
* $wgRSSUrlWhitelist = array( "*" );
* $wgRSSUrlWhitelist = array("*");
* $wgRSSUrlWhitelist = array("blog.wikimedia.org/feed/");

Whatever I do, I don't get it to work. It beheaves very strangly, as I add the array ("*") and it still gives me the same error message with that the feed I want to use is not the one that is on the list (instead of telling me that there aren't any on that list at all). And yes, my WikiMedia version matches the requirements.

What can I do? Thanks in advance, hpH

Wikinaut (talkcontribs)

Hi, please indicate your exact versions:

PHP, MediaWiki, RSS extension.

In my reference installation. it works perfectly.

Make sure to have the correct order of statements (first: require...., then your parameters!) in order to really overwrite the built-in default settings for the whilelist with your wanted values:

require_once("$IP/extensions/RSS/RSS.php"); /* git version from https://github.com/Wikinaut/mediawiki-extension-RSS  */
$wgRSSUrlWhitelist = array( "*" ); /* see documentation for security issues */
$wgRSSUrlNumberOfAllowedRedirects = 1;
$wgRSSAllowLinkTag = true;
$wgAllowImageTag = true;
Wikinaut (talkcontribs)

The bug reporter answered:

Hey guys,

   MediaWiki: 1.19.1
   PHP: 5.3.15 (cgi-fcgi)
   MySQL: 5.1.61-0+squeeze1-log

Thats that. But I 'figured' out the whats the problem. It is as Bawolff stated, the hoster disabled the function to open the URLs. cURL wouldn't work either and their policy is to keep those ports closed. As long as I am at this provider I won't be able to use the RSS-extension. They mentioned fsockopen as an alternative, but I can't use that as I have not enough of some digital currency there.

Thanks though, as soon as I change the hoster I'll get back to you with feedback.‎15:24, 12 August 2012 (talkcontribs)

MediaWiki: 1.19.1

Does not worked with RSS cause function wfRandomString() not defined in GlobalFunctions.php

Reply to "[RESOLVED WORKSFORME] "allow all URLs" wont work"
أحمد (talkcontribs)

Is it possible to specify in mediawiki:Rss-item elements other than those specified by default to pass to mediawiki:Rss-feed? For example "category" and/or "dc:subject"?

أحمد (talkcontribs)

Also, I'm trying to understand how the system works:

If it is not possible to specify elements, what's the rationale behind a two-template design?

Why can't one just use the template that fleshes out feed items directly, processing only desired elements among those hardcoded in the extension and ignoring the rest?

Reply to "Other elements?"
أحمد (talkcontribs)

The naming of the default templates is somewhat confusing:

Mediawiki:Rss-item should be named Mediawiki:Rss-elements, since all it does is pass the items' elements selected for processing to the formatting template.

While Mediawiki:Rss-feed is the one that should be named Mediawiki:Rss-item since what it does is display/format one item per transclusion.

The feed, or channel according to RSS nomenclature, is comprised of the collection of items, each of which is represented by the latter template.

Reply to "Naming of default templates"

Failed to load RSS feed from https server. Error fetching URL: Peer certificate cannot be authenticated with known CA certificates

7 (talkcontribs)

Just wondering if anyone else had incurred this error before with this extension ? Does the RSS extension use cURL to get the feed ? I probably would have to get mod_ssl for my Wiki in order to connect to the SSL server but even then, the certificate may be bad. Does anyone know if I can make the extension, or if it uses cURL to somehow make it ignore the certificate in question ?

Shayne l (talkcontribs)
Jasper Deng (talkcontribs)

Did you try not using SSL? (talkcontribs)

Jasper - yeah, I did try running the server we wanted to get the feed from, on a non secure port (that is, an unencrypted port) but got what Shayne above is getting. Not sure what's up. Both servers sit behind a reverse proxy server and there's also an ldap server in the mix which users need to get authenticated with which involves cookies being dropped. Also some redirection is being done but noticed there is a parameter for redirection - which i used but still no good.

Wikinaut (talkcontribs)

The message

Error parsing XML for RSS

comes from older RSS extension versions. Apart from a possible SSL problem, you need to use the version indicated on the RSS article page:

2.15 r114168 (2012-03-19 (use revision r114168 in SVN))

Warning: the version in git is currently not up to date (due to pending code reviews).

Older versions did not correctly parse all kinds of feeds. A good way to check the extension is to copy the XML feeds from the original server to a different non-SSL server and then to let the RSS extension load from there.

This post was hidden by (history)
This post was hidden by (history)
Reply to "Failed to load RSS feed from https server. Error fetching URL: Peer certificate cannot be authenticated with known CA certificates"