RSS block picks the wrong links for articles

Bug #800493 reported by François Marier
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Mahara
Fix Released
Low
Melissa Draper

Bug Description

Version: 1.4.0

RSS feed: http://feeds.cloud.geek.nz/FeedingTheCloud

If you click on any of the articles, you are taken to the comments feed for the article instead of the article page itself. This works fine in other feed readers (like Akregator and Liferea).

It was also a problem on 1.3, see my profile page for example:

  http://mahara.org/user/view.php?id=6

Tags: rssblock
Changed in mahara:
assignee: nobody → François Marier (fmarier)
milestone: none → 1.5.0
assignee: François Marier (fmarier) → nobody
milestone: 1.5.0 → none
Changed in mahara:
importance: Medium → Low
milestone: none → 1.5.0
Melissa Draper (melissa)
Changed in mahara:
assignee: nobody → Melissa Draper (melissa)
Revision history for this message
Melissa Draper (melissa) wrote :

We are currently grabbing the first article <link ... tag, which feedburner happens to list as the comments link. Listed last is the "alternate" url which is what you're expecting. The PEAR XML parser class we're using currently, XML_Feed_Parser appears to simply happily grab the first <link ... tag for each post. AIUI we'd have to rewrite the feed parsing with another parser class.

I suspect this issue would most commonly be associated with feedburner feeds.

Revision history for this message
François Marier (fmarier) wrote :

It looks like a problem with the parsing of Atom feeds. Here's another one that has comment links first:

  http://blog.libravatar.org/index.atom

According to the atom spec, we need to look for the rel="alternate" link (or a link without a "rel" property -- assumed to be "alternate"):

  http://www.atomenabled.org/developers/syndication/atom-format-spec.php#rel_attribute

So I guess we need to patch the pear module and then submit that patch upstream so that we can hopefully drop it at some point in the future.

Melissa Draper (melissa)
Changed in mahara:
status: Confirmed → In Progress
Revision history for this message
Melissa Draper (melissa) wrote :

I have pushed a potential patch to https://reviews.mahara.org/#change,893 for testing. Once we're sure it's working as planned, I'll submit a pull request to the upstream where we'll hopefully be able to grab the fixed version from at some point before the release.

Revision history for this message
Melissa Draper (melissa) wrote :

The fix has been pulled into the upstream and will be included when we next update PEAR XML_Feed_Parser. Other patches on PEAR XML_Feed_Parser are being pushed to upstream as well, so this should make future upgrades to this library more simple.

Revision history for this message
François Marier (fmarier) wrote :

Melissa, do you know what the status of this is?

Will we get the fixes if we upgrade to the latest upstream now?

Changed in mahara:
milestone: 1.5.0 → none
status: In Progress → Triaged
status: Triaged → In Progress
milestone: none → 1.5.0
Revision history for this message
Melissa Draper (melissa) wrote :

I'm not confident of putting the latest version of the XML_Feed_Parser pear package in without much time for testing as there were some not-insignificant changes to it in terms of tests and logs.

However I've fixed up the patch and pushed a clean patchset to gerrit and that ought to be ok.

Revision history for this message
Mahara Bot (dev-mahara) wrote : A change has been merged

Reviewed: https://reviews.mahara.org/893
Committed: http://gitorious.org/mahara/mahara/commit/db635959c43062618bae312215a4e2b8d028ee12
Submitter: Francois Marier (<email address hidden>)
Branch: master

commit db635959c43062618bae312215a4e2b8d028ee12
Author: Melissa Draper <email address hidden>
Date: Mon Nov 28 19:03:04 2011 +1300

    Fix the selection of the link for atom feeds (bug #800493)

    Fixes the process by which the link is chosen, which wasn't
    choosing the correct link for articles or indeed the feed
    itself. This was affecting feedburner atom feeds specifically.

    Change-Id: Ic7989af6d81ecaac6ed4ddbc379447bd78e3d5c6
    Signed-off-by: Melissa Draper <email address hidden>

Changed in mahara:
status: In Progress → Fix Committed
Melissa Draper (melissa)
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.