WordPress Plugin: MagpieRSS Hotfix for Enclosure Support and Character Encoding Issues

Latest version: 1.2 – Released 16th December 2008

Description

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.

Installation

  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.

Download

ZIP file from downloads.wordpress.org

FAQ

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

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

20 replies on “WordPress Plugin: MagpieRSS Hotfix for Enclosure Support and Character Encoding Issues”

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

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

    John.

  3. 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?

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

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

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

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

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

  9. 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)

  10. Hi,

    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/waysforkidstomakemoneyonline.com/wp-includes/rss.php:404) in /home/panyang/public_html/waysforkidstomakemoneyonline.com/wp-content/plugins/energizer/lib/rss_fetch.inc on line 221

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

Comments are closed.