? ? Pending

User tests: Successful: Unsuccessful:

avatar Spudley
Spudley
18 May 2017

Pull Request for Issue #15348.

Summary of Changes

Per the issue #15348, there are issues when displaying some Atom feeds in Joomla.

  1. For some feeds (examples: https://code.tutsplus.com/categories/php.atom, http://planet.debian.org/atom.xml ), the feed is rendered in Joomla with only the titles, and no content.

    This is due to the feed items not containing a summary element. It does, however have a content element. I have therefore made a change to the feed parser such that if the summary is found to be missing, it will fall-back to using the content instead.

  2. For many Atom feeds (examples: https://www.gov.uk/government/organisations/home-office.atom, https://www.theregister.co.uk/headlines.atom), when the feed items are displayed in Joomla, the title link points to the main feed URL instead of the URL for the article. In fact most Atom feeds that I've tried exhibit this behaviour.

    This is due to the fact that the Atom feed parser is assuming that the id element in each feed item will contain a valid URL for the source article. This is not usually the case; the id element generally does contain a unique identifier, but it is often not a URL. The actual URL that we should be linking to is usually contained within a link element within the item.

    I have therefore made changes to the feed parser such that if the ID is found not to contain a valid URL, then we fall-back to the link elements.

    Most feeds only have a single link element per item, but this change also takes into account the fact that some feeds may have multiple link elements per item, distinguished by different rel attributes. In this case, the parser will attempt to find the best one to use -- this is generally the one without a rel attribute at all or with rel="alternate". NB: I have not found any live feeds that triggered this code, but I used the example XML on Wikipedia as a reference.

Testing Instructions

  • Create a newsfeed category in Joomla and a menu entry to display it.
  • Add a selection of Atom newsfeeds to the category as you can find. You should include the four feeds referenced above as they are known to demonstrate the issues, but finding others to test as well may be helpful.

Expected result

  • With the changes in place, TutsPlus and Debian feeds show the item contents as well as just the headlines.

  • With the changes in place, the headlines in the Home Office and The Register feeds can be clicked to link to the articles.

Actual result

  • Before the changes, TutsPlus and Debian feeds only show headlines.

  • Before the changes, clicking article headlines on the Home Office and The Register feeds takes you to the atom newsfeed itself rather than the article.

Documentation Changes Required

None.

avatar Spudley Spudley - open - 18 May 2017
avatar Spudley Spudley - change - 18 May 2017
Status New Pending
avatar joomla-cms-bot joomla-cms-bot - change - 18 May 2017
Category Libraries
avatar Spudley Spudley - change - 18 May 2017
Labels Added: ?
avatar Spudley Spudley - edited - 18 May 2017
avatar brianteeman
brianteeman - comment - 26 May 2017

I have tested this item successfully on a70064a

Confirmed both issues with the sample atom feeds
Confirmed the PR fixes both issues - thanks


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/16105.

avatar brianteeman brianteeman - test_item - 26 May 2017 - Tested successfully
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 26 May 2017

I have tested this item successfully on a70064a

Test on given 4 Url:


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/16105.

avatar franz-wohlkoenig franz-wohlkoenig - test_item - 26 May 2017 - Tested successfully
avatar joomla-cms-bot joomla-cms-bot - edited - 26 May 2017
avatar franz-wohlkoenig franz-wohlkoenig - change - 26 May 2017
Status Pending Ready to Commit
avatar franz-wohlkoenig
franz-wohlkoenig - comment - 26 May 2017

RTC after two successful tests.

avatar rdeutz rdeutz - change - 26 May 2017
Status Ready to Commit Fixed in Code Base
Closed_Date 0000-00-00 00:00:00 2017-05-26 17:58:12
Closed_By rdeutz
Labels Added: ?
avatar rdeutz rdeutz - close - 26 May 2017
avatar rdeutz rdeutz - merge - 26 May 2017

Add a Comment

Login with GitHub to post a comment