Latest version: 1.2 – Released 16th December 2008


This hotfix adds support for RSS enclosures to MagpieRSS, the RSS parser behind the fetch_rss() function in WordPress. It also forces MagpieRSS to use UTF-8 character encoding, which fixes some issues with feeds that contain non-ASCII characters.

Is this plugin for me?

This plugin is only going to be of use to you if:

  1. You are fetching feeds on your blog with the fetch_rss() function and want to parse enclosures contained in the feed; or
  2. You are fetching feeds on your blog either with the RSS Sidebar Widget or with fetch_rss() and question marks are showing up somewhere in the feed where special characters are supposed to be.


  1. Unzip the ZIP file and drop the folder straight into your wp-content/plugins directory.
  2. Activate the plugin through the ‘Plugins’ menu in WordPress.
  3. That’s it! You can now parse enclosures contained in feeds fetched by WordPress.


ZIP file from


For FAQs, including how to parse enclosures in your feed, please see the plugin’s FAQ page on

Any comments, questions, queries, suggestions, complaints, etc, please leave a comment!


  1. gilles Says:


    how can i show enclosure in this rss feed.?


  2. John Blackbourn Says:

    Hey Gilles, take a look at the plugin FAQ where I’ve included some sample code for grabbing the enclosures from a feed. It should be enough to get you started.

  3. Hank Says:

    I followed your instructions. However, when trying to activate I get the follow error:

    Fatal error: Cannot redeclare fetch_rss() (previously declared in /path/to/server/htdocs/wp-includes/rss.php:390) in /path/to/server/htdocs/wp-content/plugins/magpierss-hotfix.php on line 525

    I don’t understand how you are trying to override fetch_rss()

    Apart from copying your code into the rss.php file, do you have a nicer /plugin way?

    Thanks for the plugin /your help.

  4. John Blackbourn Says:

    Hank, that’s odd.

    The function fetch_rss() is a pluggable function. This means that a plugin can override it simply by declaring it. If you take a look at wp-includes/rss.php you’ll note that fetch_rss() is wrapped in a check:

    if ( !is_function('fetch_rss') ){ …function here… }

    I have an idea why this error is ocurring though. I’ll push an updated version of the plugin out shortly.


  5. John Blackbourn Says:

    Version 1.0.1 released – Wrap the patched fetch_rss() function in a function_exists() check to prevent errors upon activation.

  6. Hank Says:

    John, thanks for the update. No error messages when updating now indeed. However, I can’t retrieve the enclosure url following your instructions. Any idea what’s causing this?

  7. Hank Says:

    Just interested: which plugins are you using for previewing comments /subscription management?

  8. John Blackbourn Says:

    Hank, which version of WordPress are you using?

    Comment preview plugin is here and comment subsription plugin is here :)

  9. Hank Says:

    John, thanks for the links! I am using WordPresss version 2.6.3

  10. John Blackbourn Says:

    Hank, can you send me the code you’re using to get the enclosure links? Feel free to email me at the email address shown here.

  11. John Blackbourn Says:

    Version 1.1 released – The plugin now clears WordPress’ RSS cache upon activation so fresh feeds are fetched and then cached complete with their enclosures.

  12. James Mentz Says:

    John, you have saved my sanity with this ingenious little plugin!

    Many thanks.

  13. Lisa Says:

    WARNING: This “hotfix” is a nightmare to deactivate. Since it didn’t fix my problem (I still got those weird symbols), I tried to rid my WP installation of the plugin, only to have it return the error Hank mentions above. Your code really needs to be changed so it doesn’t create hassles for users who decide they don’t want the plugin after trying it out.

    How do I get the plugin completely out of my installation without having to install WP all over again from scratch? Please provide the solution here so future users can find it easily.

  14. John Blackbourn Says:

    Hi Lisa, thanks for the comment.

    Sorry the plugin didn’t fix your character encoding issue. Do you have a link to your blog?

    If you can’t deactivate the plugin from the Plugins menu in WordPress, simply delete the plugin files from your server and the plugin will be automatically deactivated.

    Please let me know if your blog still shows any errors after deleting the plugin.

  15. John Blackbourn Says:

    Plugin version 1.2 released. Fixes possible errors on activation.

  16. Rarst Says:

    I am using KB Advanced RSS plugin that uses MagpieRSS. Looking for solution for enclosures and tried your plugin but it makes KB Advanced RSS die (no error messages). Can’t figure out why because it breaks even on feeds that have no enclosures.

    Unfortunately author of that one is not providing support at moment. :(

    Any hints what else I can try to get enclosures support?

  17. Rarst Says:

    PS I tried patching rss.php with your fix for enclosure and it works (also got rid of extra array level). So KB Advanced RSS is probably getting broken by something else in your plugin.

    Big thanks. :) Now I have to figure out how to apply fix without messing with rss.php

  18. Danmark Bag Facaden Says:

    i have on my wordpress blog, in my, tag page is have NewsFeeds (NyhedsLinks) from other news sources and im trying to solve how to iframe the_permalink() in blog post so that i can retrieve the whole feed in my blog in a iframe =) thx for this magpierss hotfix ;o)

  19. Ways For Kids To Make Money Online Says:


    I was searching the internet on how am I going to solve this problem of mine. I was trying to activate a plugin called backlink energizer, this is a plugin that indexes your backlinks faster. I was prompted with the following error when trying to activate it.

    Fatal error: Cannot redeclare fetch_rss() (previously declared in /home/panyang/public_html/ in /home/panyang/public_html/ on line 221

    I did try installing your plugin hoping to fix this. But I still get the same error.

  20. John Blackbourn Says:

    You’ll need to contact the author of that plugin to get it fixed. Sounds like the plugin hasn’t been updated to support recent versions of WordPress.

Comments are closed