Make WordPress Core

Opened 9 years ago

Closed 8 years ago

#2683 closed defect (bug) (wontfix)

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

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


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 (8)

comment:1 @ringmaster9 years ago

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

comment:2 @Otto429 years ago

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.

comment:3 @elidourado9 years ago

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

comment:4 @Nazgul9 years ago

  • Keywords dev-feedback added
  • Milestone set to 2.4

Is this still valid after the recent Atom changes?

comment:5 @Otto429 years ago

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.

comment:6 @Otto429 years ago

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.

comment:7 @thee178 years ago

  • Keywords old-inactive-9mos-ticket added

comment:8 @thee178 years ago

  • Milestone 2.5 deleted
  • Resolution set to wontfix
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.