Extension talk:News Channel
Blank line; missing properties.Edit
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:
and undefined variables:
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)
RemoveArticlePrefix and namespaceEdit
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)
Does not work well with my German wikiEdit
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:. 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. 184.108.40.206 11:51, 5 March 2009 (UTC)
I have the same error in a spanish installation (MediaWiki 1.20), but my index.php generated, is a xml with the first line empty, which causes navigator unrecognize the xml feed:
<?xml version="1.0" encoding="utf-8"?> <rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> <channel> ...
Is any bug of this extension?
Thanks for advance, Carlos
- This is caused by excess newline character, added by you to source code somewhere. Unfortunately it can be difficult to locate. You should carefully explore every place in MediaWiki PHP files, that you edited recently, and try to find this character. Pay special attention to blank lines before "<?php" and after "?>" characters. If the blank line is also present on main page of your wiki, then it's most probably located in LocalSettings.php file or one of files included there by require() or require_once() directive. --CodeMonk (talk) 05:10, 12 July 2013 (UTC)
- I have found the blank line in one of my extensions, thanks for all :) Carlos
It's not working (not able to get it published). What is the output format for the rss feed?
Some errors foundEdit
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. --220.127.116.11 21:13, 24 June 2009 (UTC)
- Yes, Chrome has no built-in RSS support. --CodeMonk 03:47, 17 January 2012 (UTC)
Feed stopped working...Edit
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.
- 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
Can't Get NewsChanel to Work - See BelowEdit
Thank you for your assistance. I'm trying to set up a news feed that is updatable by myself so that i can enter some details and have it show up on the feed.
I followed the instructions located here: https://www.mediawiki.org/wiki/Extension:News_Channel but when I create the new feed via the special page (Special:NewsChannel) it results in the following:
and my code:
but the feed never appears on the home page. Am I missing something? Do I have to add any sections to the home page?
Any help is much appreciated