Extension talk:News Channel
Contents |
[edit] Blank line; missing properties.
I have been trying to implement this extension. Much seems to be going OK, but I cannot display the feed (or subscribe to it successfully.) The main problem seems to be that the feed XML has a blank line at the beginning. However, there are other issues. The Apache2 error log shows the following Undefined properties:
- NewsChannel::$newsWikiExcludeCategory
- NewsChannel::$authorizedEditors
and undefined variables:
- $wgNewsChannelExportTextOnly
all in NewsChannel_body.php
The blank line shows up in the Recent Changes feed, also.
Any help would be greatly appreciated.
Susan 18:22, 17 February 2009 (UTC)
- Sorry, I can't help with blank line. It's not the first time I here about blank line, that breaks the feed recognition, but I have no solution, and that line doesn't seem to be connected with "News Channel" extension. Please, send me a note, if you find out something. --CodeMonk 18:15, 27 February 2009 (UTC)
- I'll fix other mentioned minor problems in next release. --CodeMonk 18:15, 27 February 2009 (UTC)
-
- The tip about the blank lines worked. The undefined variable is fixed by adding $wgNewsChannelExportTextOnly the global declaration line:
- global $wgServer, $wgNewsChannelExportTextOnly;
- in the function renderWikiMarkup (NewsChannel_body.php, ~ line 330)
- Susan 13:02, 14 April 2009 (UTC)
[edit] RemoveArticlePrefix and namespace
Just a note to anyone who, like me initially, wonders how to strip both namespace and prefix from article titles: the namespace won't be included in the title, so it shouldn't be mentioned in $wgNewsChannelRemoveArticlePrefix's value. So even if the News/...-titled pages you want to follow are in the Talk: namespace, you should still specify $wgNewsChannelRemoveArticlePrefix as just 'News/' instead of 'Talk:News/' if you want the titles without the Talk:News/ prefix. -Jani Uusitalo 14:14, 24 February 2009 (UTC)
- Yes, that's right. I'll mention that in documentation. --CodeMonk 18:15, 27 February 2009 (UTC)
[edit] Does not work well with my German wiki
I installed this extension on my local wiki (language de). When subscribing a single page history everything works just fine: a rss feed is created as follows (Firefox): feed location: http://127.0.0.1/mediawiki/index.php?title=News_1&feed=rss&action=history site location: http://127.0.0.1/mediawiki/index.php?title=News_1&action=history also the feed changes when the page is revised.
However the category subscription does not work on my wiki. When using IE6 I go to the Special page and don't have to select anything because it's just fine: rss & Category=News. After clicking "Create feed" I get a file for downloading as follows:
<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>MyWikiSite.com IT News</title>
<link>http://127.0.0.1/</link>
<description>Most hot IT news on MyWikiSite.</description>
<language>en-US</language>
<copyright>Copyright © MyWikiSite.com. All rights reserved.</copyright>
<image>
<url>http://www.mywikisite.com/rssicon.png</url>
<title>MyWikiSite.com IT News</title>
<link>http://127.0.0.1/</link>
</image>
<lastBuildDate>Wed, 04 Mar 2009 00:19:04 +0100</lastBuildDate>
<generator>News Channel 1.61 (MediaWiki extension)</generator>
<docs>http://www.rssboard.org/rss-specification</docs>
<ttl>60</ttl>
<atom:link href="http://127.0.0.1/mediawiki/index.php?title=Spezial:Nachrichtenkanal&format=rss20&limit=10&wpSubmitNewsChannelParams=Feed+erstellen" rel="self" type="application/rss+xml" />
</channel>
</rss>
but I cannot open the file (in IE or Outlook). Using the special page with Firefox and after clicking "create feed" I get a.m. contents on screen and I can click on "create" again. But then a feed is created as follows: feed location: http://127.0.0.1/mediawiki/index.php?title=Spezial:Nachrichtenkanal&format=rss20&limit=10&wpSubmitNewsChannelParams=Feed+erstellen site location: http://127.0.0.1/
does anybody else have this kind of problem? is the usage of the German language causing this issue? any help is appreciated K.W.
- I think it's a bug in Microsoft IE:[1]. In Mozilla Firefox you probably won't have the above mentioned behavior-Bert
- If I remember correctly, IE 6 doesn't support feeds, you need to upgrade to IE 7. --CodeMonk 01:11, 5 March 2009 (UTC)
-
- I spent a lot of time - but finally I got it - some settings in LocalSettings.php are mandatory - otherwise you can run into trouble - as I've seen. Following settings I needed to activate:
- OLD: (did not work)
#$wgNewsChannelLogoImage = 'http://www.mywikisite.com/rssicon.png'; #$wgNewsChannelRemoveArticlePrefix = 'News/'; $wgNewsChannelAuthorizedEditors = array( 'John Doe', 'Jane Doe', 'Alex' );
-
- NEW: (works)
$wgNewsChannelRemoveArticlePrefix = 'News/'; $wgNewsChannelAuthorizedEditors = array( ); $wgNewsChannelLogoImage = 'http://www.mywikisite.com/rssicon.png';
-
- Maybe someone will shed some light on which setting is mandatory and which is optional - but for now I'm satisfied. --K.W. 84.149.230.168 11:51, 5 March 2009 (UTC)
[edit] Not working
It's not working (not able to get it published). What is the output format for the rss feed?
- RSS itself is the output format w:en:RSS_(file_format). What is exactly the problem? What do you see when you press "Create feed" button on "Special:NewsChannel" page on your wiki? --CodeMonk 22:55, 1 May 2009 (UTC)
[edit] Some errors found
In IE and chrome, the default copyright symbol (c) is causing encoding errors. Once I removed the symbol the feed would display.
Also, the feed displays in normal text in chrome (html not supported I guess) <- may not be bug with this extension. --207.190.231.66 21:13, 24 June 2009 (UTC)
- Yes, Chrome has no built-in RSS support. --CodeMonk 03:47, 17 January 2012 (UTC)
[edit] Feed stopped working...
This is the output I get since I upgraded to MediaWiki 1.18 - PHP means nothing to me so I can't even offer an idea of what's happening.
If you want to try it for yourself - drop me an eMail to Lyndka(at)hotmail.co.uk and I'll add you to the feed create list for the wiki in question.
Thanks ever so.
Link to screenie of fault here
- New version 1.65 was released with MediaWiki 1.18 support. --CodeMonk 03:47, 17 January 2012 (UTC)
- Yay - lovely - it did work, thank you ever so!! Lyndka