Extension talk:RSS

Jump to: navigation, search

About this board

Archives 

Archive

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
PHP
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.


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.

Reply to "RSS.php not in git repo"
2003:63:2F1B:A712:76D4:35FF:FEF7:1C46 (talkcontribs)

Using this extension with Google Feeds returns HTML code of intended thumbnails instead of descriptions, which can be removed by a template excluding descriptions altogether, e.g.: Template:Google-feed:

[{{{link}}} {{{title}}}]
{{{author}}} {{{date}}}

<rss template="Google-feed">http://news.google.com/news?pz=1&cf=all&ned=fr&hl=fr&q=iphone&output=rss</rss>

Or does anyone have better a solution to include descriptions without Google's HTML markup appearing in the output?

Yellowdog (talkcontribs)

Having tested various settings with images and HTML I can conclude including descriptions with Google feeds does not work. Only link, title and date works.

CayceP (talkcontribs)

I was able to fix this on my local XAMPP installation like this for Mediawiki 1.27.0 and RSS Version 2.25.0 (2014-03-28):PHP 5.6.23 (apache2handler), MySQL 5.5.39

in RSSParser.php remove the following if condition in line 403

if ( isset( $wgRSSAllowImageTag ) && $wgRSSAllowImageTag ) {

$extraInclude[] = "img";

} else {

$extraExclude[] = "img";

}

This way the images were displayed for my Google Feed.

So the block from line 394 should look like this:

protected function escapeTemplateParameter( $text ) { global $wgRSSAllowLinkTag, $wgRSSAllowImageTag; $extraInclude = array(); $extraExclude = array( "iframe" ); if ( isset( $wgRSSAllowLinkTag ) && $wgRSSAllowLinkTag ) { $extraInclude[] = "a"; } else { $extraExclude[] = "a"; }if ( ( isset( $wgRSSAllowLinkTag ) && $wgRSSAllowLinkTag ) || ( isset( $wgRSSAllowImageTag ) && $wgRSSAllowImageTag ) ) { $ret = Sanitizer::removeHTMLtags( $text, null, array(), $extraInclude, $extraExclude ); } else { // use the old escape method for a while $text = str_replace( array( '[', '|', ']', '\, 'ISBN ', 'RFC ', '://', "\n=", 'Template:', '', ), array( '[', '|', ']', ''', 'ISBN ', 'RFC ', '://', "\n=", '{{', '}}', ), htmlspecialchars( str_replace( "\n", "", $text ) ) );

// keep some basic layout tags

also change your LocalSettings.php to something like this:

#RSS

require_once( "$IP/extensions/RSS/RSS.php" );

$wgRSSUrlWhitelist = array ("your Feed urls here" ,"etc");

$wgRSSAllowLinkTag = true;

$wgRSSItemMaxLength = 5000; //if the length is too short, the parsed URL will be trunctuated and result in HTML tags

$wgRSSDateDefaultFormat = "d-m-Y H:i";

$wgRSSCacheAge = 21600;

$wgAllowImageTag = true;

Yellowdog (talkcontribs)

Thanks I tested it and could get images to show up as well but for some reason the title was displayed twice and the image float was not properly aligned. Additionally, there were some html tags displayed in the output <nobr>more...</nobr> after the description. I'll use the more simplified output with the headings and the date after all and will give the use of images a miss until maybe there's an updated version of an RSS feeder.

CayceP (talkcontribs)

If your title is displayed twice, maybe it's the Rss-item template that calls the title twice?

I'm using two different templates since I use one feed for a news template via a google feed from a Google+ Community and one different feed with a different layout.Since Google+, to my knowledge still offer no RSS feed function for Google communities updates (only for personal profiles), my feed is generated by a Thirdparty page (gplusrss.com).

Maybe that's why it works for my feed and not for yours. Although, for security reasons I would prefer If I could get a rendered RSS feed without images or the image html tags from Google.My template looks like this for google feeds:

{{{date}}} [{{{link}}} {{{title}}}]

{{{description}}}

If you don't have a specified a special template, maybe check your MediaWiki:RSS-item article page if the duplicate title is called there because the If conditions now has changed.

2A04:2413:8301:200:B89C:7C8B:B7D6:5772 (talkcontribs)

Hi. Does anyone know how to strip html tags from description? I couldn't find the place in RSSParser.php, where to use the strip_tags() function.

CayceP (talkcontribs)

Look for Sanitizer::removeHTMLtags that where the regEx replac of the html tags happens in RSSparser.php

Reply to "Google Feeds"

<rss-error> when displaying page with RSS feed

3
41.87.227.160 (talkcontribs)

Hi all

I'm starting with this extension and am having a little difficulty.

MediaWiki 1.28

RSS 2.25

running on a system with laters version of XAMPP (for testing and development)

I have the simple code

<rss>http://blog.wikimedia.org/feed/</rss>

with nothing else in the page and I get the <rss-error> message

In the page and the URL is whitelisted.

I've probably done something wrong, but I cant figure it out.

Thanks! Simon

Shirayuki (talkcontribs)

Does the message MediaWiki:Rss-error exist on your wiki?

41.87.227.160 (talkcontribs)

No, it doesn't

Reply to "<rss-error> when displaying page with RSS feed"

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

5
173.79.173.201 (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)

I'm actually instead getting:

Failed to load RSS feed from https://internal.server/~path/feed.atom: Error parsing XML for RSS

The server is running a self-signed expired cert.

Jasper Deng (talkcontribs)

Did you try not using SSL?

173.79.110.62 (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.

Reply to "Failed to load RSS feed from https server. Error fetching URL: Peer certificate cannot be authenticated with known CA certificates"
GruensFroeschli (talkcontribs)

The supported version on the extension page is shown as "1.23+"

However the linked documentation https://phab.wmfusercontent.org/file/data/2jgp7fqzykcafrykvhmc/PHID-FILE-w2rt7owgbpkm4woh3tdr/RELEASE-NOTES claims support of the current version (2.25) from 1.17+

Which one is correct? I would assume the documentation.

If no one objects to this within a week i will change it.

~~~~

Reply to "Supported Version"

mywiki/api.php?action=feedwatchlist: Error parsing XML for RSS

1
70.51.240.91 (talkcontribs)

Using this extension with mediawiki's feedwatchlist returns this error. Has anyone had success with this?

Reply to "mywiki/api.php?action=feedwatchlist: Error parsing XML for RSS"
Uberiain (talkcontribs)

Hello i am using Extension:RSS and it's working. I want the results sorted by date, how can i do this?.

Thanks

Wikinaut (talkcontribs)

They should indeed be automatically rendered in sorted-by-time order, based on their feed item creation date.

Please can you send me the Url of the feed you are using, or the Url of your wiki page where you include the RSS feed ?

If the problem persists, please file a regular bug (please locate the link "Bugs: ... report" in the info box on the article page), so that I can better track the issue.

CayceP (talkcontribs)

in Version 2.25 seesm to be a bug regarding the reverse sorting which I fixed liked this

in RSSParser.php

line 62:

$this->reversed = true;

-> this needs to be set to false if entries should be sorted as dates desc (newst first) when the reverse variable is used in <rss>

Reply to "Sort RSS Items"

UNIQ/QINU error in MW 1.27

1
Summary by Subfader

Wrong download.

Subfader (talkcontribs)

In MW 1.27.1 I get UNIQ/QINU errors for all entries.

RSS 2.25.0

MediaWikiAccount (talkcontribs)

When I have multiple terms to filter by the filter only selects the first one

i.e. filter="term1 term2 term3"

will only display rss-items with term1 in them, excluding rss-items with term2 or term3

Reply to "Filter maulfunction"
Christharp (talkcontribs)

Mediawiki version 1.26.2

Php 5.5.30 (fpm-fcgi)

RSS Version 2.25.0 (f4aaed1)

The extension just renders the name of the template: MediaWiki:Rss-feed.

Other details:

$wgRSSUrlWhitelist = array( "*" );

$wgRSSAllowImageTag = true;

$wgRSSUrlNumberOfAllowedRedirects = 5;

I changed those a few times, but nothing worked.

I assume I'm missing something simple, because that's generally the case, but some help would be great. Thanks

Additionally info:

No errors shown. The following is set in the LocalSettings:

#Errors remove before live

$wgShowExceptionDetails = true;

error_reporting( E_ALL );

ini_set( 'display_errors', 1 );

12.96.43.3 (talkcontribs)

I am also seeing garbage on 1.26 with the plug in. Any alternatives?

Reply to "Not rendering"