Extension talk:WikiFeeds

doesn't work
http://www.dentopolis.org/dentopedia/Specjalna:WikiFeeds/rss/recentcategorychanges/category/Wydarzenia category exists :http://www.dentopolis.org/dentopedia/Kategoria:Wydarzenia

Article Titles chopped?
Some of my article titles have an "&" (e.g. Lucky & Wild) when I subscribe to the Feed all Entries are listed, but The Lucky & Wild Article has the title "Lucky ". How can I solve this problem?

Category issues 1.6.5
Not Finding Categories in version 1.6.5 always says category not valid even thought it is? any suggestions? 12.159.183.186 20:29, 10 May 2006 (UTC)
 * It works on the demo site. --24.5.180.169 16:18, 20 May 2006 (UTC)

How does it work?
So how does it work? I mean after you install, how do you render a particular feed?
 * You go to Special:WikiFeeds. I have updated the instructions to state this.--IndyGreg 20:23, 3 April 2006 (UTC)

Cant get it to work.
Hi, I really want to add RSS and ATOM feeds to my website; http://wikipubs.org especially for categories. I've taken a copy of the WikiFeeds PHP script and placed it in my extensions directory and added it to localsettings as required. The php is called, however there seems to be a problem on Line 74, is anyone else getting this problem? Please let me know how i can fix the problem or what i'll need to do to get feeds up and running.

Cheers, James

--Mcardlej 05:24, 2 April 2006 (UTC)


 * WikiFeeds requires PHP 5. I have updated the instructions to reflect this.--IndyGreg 20:23, 3 April 2006 (UTC)

"Add a line"?
To install, just place the SpecialWikiFeeds.php file in your extensions/ directory and add a line in LocalSettings.php to activate WikiFeeds.

So what is the line you add? -Christiaan 09:29, 7 April 2006 (UTC)


 * Found it in the script: include_once('SpecialWikiFeeds.php'); -Christiaan 10:01, 7 April 2006 (UTC)::
 * This didn't actually work for me. Had to use: include_once("extensions/SpecialWikiFeeds.php"); -Christiaan 10:32, 10 April 2006 (UTC)

Broken feeds by PHP notices
My WikiFeeds was generating broken feeds because of use of unitialised variables and PHP generating notices about that. Error corrected on lines 190, 195, 200 of GenericXmlSyndicationFeed.php by testing if variable is defined. Replaced original "if( $author['email']);" by "if( isset($author['email']));" I think this is the way it should be done.

Recent article feed not working
I have the extension installed properly, all the feeds work great except for recent article changes. When trying to load the feed I get this error:

Fatal error: Call to a member function getPrefixedText on a non-object in ...../wiki/includes/Article.php on line 465

Any ideas?

Whoa, load
I installed this on wikiHow just now and when I did the load on our servers went right through the roof. Any ideas why that happened? PHP 5.1.2, Mediawiki 1.6.7.

How is SpecialWikiFeeds.php supposed to find GenericXmlSyndicationFeed.php ? Is it supposed to be copied to the includes directory, or is it included in LocalSettings.php?

This line is problematic: if (!class_exists('GenericXmlSyndicationFeed')) { throw new MWException('GenericXmlSyndicationFeed class not loaded. Please read the install directions!');

MWException isn't declared until MW 1.7, although this feed says it works with 1.5+.

--Tderouin 19:37, 12 September 2006 (UTC)
 * Older versions (before revision 62) worked with 1.5 and 1.6. See http://opensource.case.edu/projects/MediaWikiHacks/log/extensions/WikiFeeds/trunk/SpecialWikiFeeds.php --IndyGreg 19:47, 12 September 2006 (UTC)


 * Do these older versions address the load issue? On our dev server that's receiving no traffic, the load shoots up to 35% just by viewing one feed, which takes about 40 seconds to load. I'm also concerned about any user being able to see everyone's watchlist, shouldn't a watchlist be private to a user? Thanks. --Tderouin 20:02, 18 September 2006 (UTC)

Needs more info on Watchlist feed
Installed wikifeeds on our local wiki, and it's really cool but doesn't seem to provide enough info on the feed. I'm particularly interested in the "My Watchlist" feed. All I get are a list of articles (full articles, not diffs, which would be a nice option) and they're all from "Watchlist for  ". It'd be awfully nice for the feed to include a field showing who made the changes, like the built-in feeds have. Is there any way to enable this through configuration, or can it be added? (neilw, 21:18, 10 October 2006 (UTC))
 * I agree, diffs would be a good feature. I'll look into adding it for a future version.  One reason I didn't do the diffs was because the built-in feeds do it already.  However, there is still no built-in watchlist feed, so I'll consider it.  Also, the feeds do have the author information attached to each entry.  If this is broken, let me know. --IndyGreg 22:17, 20 October 2006 (UTC)

Feeds in a secure envirenment
I tried to use WikiFeeds in a secure environment (only registered and logged in users can read Wiki pages) with only one page on the $wgWhitelistRead, which is Special:Userlogin. It was of course impossible. But, when I introduced (for a moment) a hole into the site security, adding yet another page to $wgWhitelistRead ie. "Special:WikiFeeds/atom/newestuserarticles/user/Rganowski", I could subscribe to news about new pages by Rganowski. And everything was OK, beside the hole, just mentioned.

Is there any other solution to my problem? I thought about such one:
 * The link to feed could have yet one more pair of parameters, passing user name and password, eg. https://foo.bar/Special:WikiFeeds/feed-format/newestuserarticles/user/user-creating-pages/username/password where username stands for name of the registered user accessing feed about pages newly created by another registered user, named: user-cerating-pages, and password is a password for the username user.
 * should then look for new parameters, parse them and login Wiki before retrieving the feed.

Would that be a not too bad point in the wish list for new features? Rganowski 13:26, 30 January 2007 (UTC)


 * Regarding WikiFeeds not obeying $wgWhitelistRead, MediaWiki is not designed with fine-grained permissions in mind. If you are using WikiFeeds in a secure environment, I highly recommend you establish a blanket HTTP Auth over the whole site (or at least over WikiFeeds) via Apache, or whatever web server you use.  You can set up MediaWiki to automatically log in users from the REMOTE_USER variable, so you won't be forcing people to log in twice.  I am not going to spend time enforcing permissions in WikiFeeds because it just isn't practical for MediaWiki.  And, posting your password as part of a URL is not a viable solution.  I have thought about creating a unique id for every user to allow private watchlist feeds (think GMail's public-private RSS feeds), however, the MediaWiki user properties are not properly normalized in the database.  To use a unique key that maps back to a user, I would have to store the map somewhere.  The only logical location is in a database and since the user properties aren't properly stored as part of a separate table with a foreign key to the user id, I would have to create a table to store just this property.  I could just create another table in the database, but I'd rather wait for the MediaWiki people to properly design the database layout. If I'm not mistaken, I think the MediaWiki API now has support for watchlist feeds... --IndyGreg 08:11, 3 February 2007 (UTC)


 * Thanks for the answer, Rganowski 13:40, 9 February 2007 (UTC)

A typo in code
WRONG: $feed->title = wfMsg('wikifeeds_newestarticlesbyuser_title', $user); $feed->description = wfMsg('wikifeeds_newestarticlesbyuser_description', $user);

RIGHT: $feed->title = wfMsg('wikifeeds_feed_newestarticlesbyuser_title', $user); $feed->description = wfMsg('wikifeeds_feed_newestarticlesbyuser_description', $user);

If not changed - for the "Newest articles created by ..." you'll have "" Viktorados 16:28, 19 February 2007 (UTC)


 * This is updated in the latest revision. Thank you for bringing it to my attention. --24.4.96.237 06:38, 1 March 2007 (UTC)

Multiple Links to One Feed
On certain pages of my site I have multiple links added (in html header) for the same feed, e.g:

http://www.wikisuccess.org/w/index.php?title=User:Viktorados&action=edit http://www.wikisuccess.org/w/index.php?title=WikiSuccess:Sandbox&action=edit

If you look at the html source code you'll se ca. 10-15 links (actually it is 2 links which repeat).

Though on other pages I have only 1 link per feed, e.g.: http://www.wikisuccess.org/

How can I solve this issue?

PS It seems like this happens only at the 'edit' pages...

--Added later--

As I understand the error is somewhere here - connected with the function wfWikiFeeds_Linker($a, $b). Is it possible somehow to restrict the execution of the function wfWikiFeeds_Linker, so that it would be executed only once per page query?

function wfWikiFeeds_Linker($a, $b) { global $wgSitename; global $wgTitle; switch ($wgTitle->getNamespace) { case NS_USER: case NS_USER_TALK: {  $username = $wgTitle->getPartialURL; ... }  break; case NS_CATEGORY: case NS_CATEGORY_TALK: {  $category = $wgTitle->getPartialURL; $catName = $wgTitle->getText; .... } return true; }

Viktorados 16:28, 19 February 2007 (UTC)
 * I'm getting this as well. Multiple RSS feeds on edit pages. --ChuckMcB 21:47, 27 February 2007 (UTC)


 * This is updated in the latest revision (r129 or later in SVN). Thank you for bringing it to my attention. --IndyGreg 06:39, 1 March 2007 (UTC)


 * Yup, looking good now --ChuckMcB 23:16, 6 March 2007 (UTC)

$wgSitename in title
The titles of the feeds are OK but they don't mention the site name...

The change is easy : protected function makeNewestArticles(GenericXmlSyndicationFeed &$feed, $count = self::DEFAULT_COUNT) { global $wgSitename; $feed->title = $wgSitename.' - '.wfMsg('wikifeeds_feed_newestarticles_title'); ... }

--Iubito 14:21, 24 March 2007 (UTC)


 * If you want to change the title, just edit the proper wikifeeds messages in the MediaWiki namespace. You can find a list of all message at Special:Allmessages. Looks for ones that begin with wikifeeds. --IndyGreg 06:50, 26 April 2007 (UTC)

How to exclude redirects
Hi again, How can I exclude the "redirects" article in Newest Articles ? --Iubito 14:22, 24 March 2007 (UTC)
 * The SQL query for newest articles should filter out redirects. MediaWiki's API might have changed since I implemented the query, so perhaps it is broken. --IndyGreg

php file returned as request output
Hi

I try to use WikiFeed deployed into linux box (apache2, php5, mediawiki 1.8.2) installation has no pb but when i read the Special:WikiFeed and try to click on the link at the bottom (... ATOM 1.0 feed of newest articles in the wiki) My browser ask me to save the file index.php when i click on the same link in yout demo site, i have not pb and firefox ask me to save the feed into my bookmark.

any idea Thx Christophe --207.45.248.18 14:54, 26 March 2007 (UTC)
 * This is most likely due to your browser not being configured to properly handle the content type of the response. WikiFeeds serves out feeds as either application/atom+xml or application/rss+xml.  Current versions of all the major browsers should handle these without any problems.  What browser and version are you using?  You can verify the feed is being produced properly by pasting a feed URI at http://www.feedvalidator.org --IndyGreg 06:56, 26 April 2007 (UTC)

Error at random
Hi folks, I'm getting this error at random:

Fatal error: Class 'DirectoryIterator' not found in /xyz/content/xyz/public/extensions/SpecialWikiFeeds.php on line 813

Any ideas? Here's my version page.
 * You probably don't have the SPL extension loaded in PHP. The DirectoryIterator class is part of the SPL.  I use this class as part of the cache cleanup process, which is "randomly" invoked whenever MediaWiki loads.  You can bypass execution of the code that uses this class by disabling the cache by altering the cacheEnable key in $wgWikiFeedsSettings.  This will negatively impact performance, however. --IndyGreg 07:00, 26 April 2007 (UTC)

empty line at start of feed
Hi Guys, I have setup WikiFeeds on my opensource.weloveit.info site but the feed is created with an empty first line , when I check it at www.feedvalidator.org it reports the same. I also get the same problem as Christophe above with the feed trying to be a download called application/atom+xml when on my own site, but not when I visit the wiki.case.edu feed. odd. Thanks, Mark Waters 07:45, 7 May 2007 (UTC) Never mind, I`ve gone to Drupal , I think it`ll be better overall.

I'm getting the same "empty line" at the beginning of my files that Mark mentions (in the crossed-out text above). If I save the outputted file to my hard drive and delete the first line, it opens fine. (Using MediaWiki: 1.10.1, PHP: 5.2.3, MySQL: 5.0.45-community-nt, Windows XP) --Kevin.dufendach 23:02, 5 September 2007 (UTC)

missing SVN repo
2nd day in a row i've tried accessing opensource.case.edu, and it isn't up. the cached version of the GenericBlah.php and Specialblah.php files in google are ancient, and don't work with trunk SVN mediawiki (1.12a). anyone have asome recent copies of those 2 files? thanks

--Kjikaqawej 23:24, 28 February 2008 (UTC)


 * Same request here : the site is still unavailable today. Gizmhail 16:46, 29 February 2008 (UTC)


 * The site still appears to be down. Anyone know where else we can find this file? - March 6, 2008


 * Would be great to have someone upload his local version somewhere/paste it on the page. Thanks - March 10, 2008

--Honza801 08:43, 28 April 2008 (UTC)


 * still cannot find the extension, no way to download... anyone could help? April 28, 2008

i keep getting this error randomly
This appears sometimes on white screen. Any suggestions?? Thanks!!! --150.214.36.10 17:20, 25 September 2008 (UTC)

exception 'RuntimeException' with message 'DirectoryIterator::__construct(/nfsn/content/ds-x/public/tmp/) [function.DirectoryIterator---construct]: failed to open dir: No such file or directory' in /var/www/html/w/extensions/SpecialWikiFeeds.php:820 Stack trace: #0 /var/www/html/w/extensions/SpecialWikiFeeds.php(820): DirectoryIterator->__construct('/nfsn/content/d...')
 * 1) 1 /var/www/html/w/extensions/SpecialWikiFeeds.php(797): SpecialWikiFeeds->_getCacheFiles
 * 2) 2 /var/www/html/w/extensions/SpecialWikiFeeds.php(188): SpecialWikiFeeds->_cachePrune
 * 3) 3 /var/www/html/w/extensions/SpecialWikiFeeds.php(907): SpecialWikiFeeds->__construct
 * 4) 4 [internal function]: wfWikiFeeds
 * 5) 5 /var/www/html/w/includes/Setup.php(300): call_user_func('wfWikiFeeds')
 * 6) 6 /var/www/html/w/includes/WebStart.php(112): require_once('/var/www/html/w...')
 * 7) 7 /var/www/html/w/index.php(40): require_once('/var/www/html/w...') #8 {main}

-

I think it's because you have enabled the cache for the WikiFeeds but you don't have any cache. Probably you have in your LocalSettings.php:

$wgMainCacheType = CACHE_NONE;

and:

$wgWikiFeedsSettings['cacheEnable'] = true;

Because the error, at least in my case, it's produced in this line:

$directory = new DirectoryIterator($this->_settings['cacheRoot']);

when the wikifeeds tries to open the directory where the cache is stored. Maybe the solution is to set the $wgWikiFeedsSettings['cacheEnable'] to false.

How i install ?
I don't understand how to install this extens Where i must copy the file SpecialWikiFeeds ? in include/speciales ? I must to edit SpecialPage.php ans at this specialpage ?

I yes, and after ? because i try it and obtain a webpage with the source code when i go to wiki/Special:WikiFeeds/atom/newestarticles

Sorry, i'm not english and do not understand how install it !

Where is the Source Code?
The links to source code don't works. Exists another way to obatin? Thanks