Ticket #2683 (closed defect: wontfix)

Opened 3 years ago

Last modified 8 months ago

rss-functions.php incorrectly handles multiple links in atom format

Reported by: elidourado Assigned to: anonymous
Priority: normal Milestone:
Component: General Version: 2.0.2
Severity: minor Keywords: dev-feedback old-inactive-9mos-ticket
Cc:

Description

rss-functions.php parses Atom feeds by abstracting them to RSS feeds. Atom feeds can have multiple link elements, and rss-functions.php tries to handle this by selecting only the links that have the attribute 'rel'=='alternate'. The problem is created when the atom feed has multiple link elements with that attribute set. For example, a feed might have /feed/entry/link/$attr[rel]='alternate' AND /feed/entry/source/link/$attr[rel]='alternate'. Currently, rss-functions.php inadvertantly concatenates the two together.

I discovered this when using a shared feed from Google Reader in an RSS widget.

Example feed: http://www.google.com/reader/public/atom/user/07602940155368702956/label/www

Change History

04/25/06 02:24:54 changed by ringmaster

Any chance of updating Magpie (if an update exists) or swapping it out for something better?

04/27/06 05:07:36 changed by Otto42

Magpie has been updated significantly since it was used to make rss-functions.php. I sorta hacked a new rss-functions.php file together for my google calendar widget here: http://ottodestruct.com/blog/2006/04/18/google-calendar-widget/

But I wouldn't recommend using that code in wordpress. What really should happen is that rss-functions.php needs to be reworked to use the MagpieRSS code directly, using the unaltered files from here: http://magpierss.sourceforge.net/ That way, updating Magpie would be simply dropping the new files into place from the Magpie project. Shouldn't be too hard to do.

06/20/06 22:17:35 changed by elidourado

FYI, I've solved the particular problem I had by running the Google Reader feed through Feedburner.

04/04/07 21:29:09 changed by Nazgul

  • keywords set to dev-feedback.
  • milestone set to 2.4.

Is this still valid after the recent Atom changes?

04/05/07 02:22:26 changed by Otto42

The atom parsing of the rss.php file is still very, very strange. It does concatenate several fields and it handles atom very poorly, overall. However, atom now seems to be a dying format. Google, which used to be exclusively atom, has recently standardized a lot of their API, and while they still default to atom feeds, they also offer RSS2 feeds if you specifically request them, on virtually all of their services that offer feeds.

So while this is still a problem to some degree, I think it's not a particularly critical one.

More to the point, given that most of this code is derived from another source (Magpie/Snoopy), it would make more sense to yank this modified version out and work on a way to include their code in a more direct fashion instead of having a somewhat hacked up version in the source. That way, new versions of that code can be easily incorporated into future revisions.

I vote for pushing this back to 2.3 or 2.4, or until somebody gets annoyed about it enough to work on it. I stopped messing around with it when Google standardized and started offering everything in RSS2 compatible formats.

04/05/07 02:27:36 changed by Otto42

Additional: Note that it's not problem-free for RSS feeds either. It doesn't recognize a lot of custom features and tends to just ignore them entirely, making it useless for fetching some things (picasa web feeds, notably). Some functionality that would retrieve a feed and parse it as XML without doing any interpretation of it would not be out of the question.

01/08/08 00:34:32 changed by thee17

  • keywords changed from dev-feedback to dev-feedback old-inactive-9mos-ticket.

03/19/08 03:56:47 changed by thee17

  • status changed from new to closed.
  • resolution set to wontfix.
  • milestone deleted.