Make WordPress Core

Opened 18 years ago

Closed 16 years ago

#2683 closed defect (bug) (wontfix)

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

Reported by: elidourado's profile 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:

Change History (8)

#1 @ringmaster
18 years ago

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

#2 @Otto42
18 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:

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: That way, updating Magpie would be simply dropping the new files into place from the Magpie project. Shouldn't be too hard to do.

#3 @elidourado
18 years ago

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

#4 @Nazgul
17 years ago

  • Keywords dev-feedback added
  • Milestone set to 2.4

Is this still valid after the recent Atom changes?

#5 @Otto42
17 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.

#6 @Otto42
17 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.

#7 @thee17
16 years ago

  • Keywords old-inactive-9mos-ticket added

#8 @thee17
16 years ago

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