RSS block picks the wrong links for articles

Bug #800493 reported by François Marier on 2011-06-22
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Melissa Draper

Bug Description

Version: 1.4.0

RSS feed:

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:

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) on 2011-11-23
Changed in mahara:
assignee: nobody → Melissa Draper (melissa)
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.

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:

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"):

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) on 2011-11-28
Changed in mahara:
status: Confirmed → In Progress
Melissa Draper (melissa) wrote :

I have pushed a potential patch to,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.

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.

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

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) on 2012-04-18
Changed in mahara:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers