Issue Details (XML | Word | Printable)

Key: MDL-7946
Type: Improvement Improvement
Status: Resolved Resolved
Resolution: Fixed
Priority: Minor Minor
Assignee: Dan Poltawski
Reporter: Petr Skoda
Votes: 18
Watchers: 8
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle

Use simplepie instead of magpie for rss parsing

Created: 17/Dec/06 11:00 PM   Updated: 30/Jul/09 10:52 PM
Return to search
Component/s: RSS
Affects Version/s: 1.6, 1.7, 1.8
Fix Version/s: 2.0

File Attachments: 1. Zip Archive simplerss.zip (2 kB)

Issue Links:
Relates
 

Participants: Charles Fulton, Dan Poltawski, Juan Segarra Montesinos, Kenneth Newquist, Mark Pearson and Petr Skoda
Security Level: None
Resolved date: 30/Jul/09
Affected Branches: MOODLE_16_STABLE, MOODLE_17_STABLE, MOODLE_18_STABLE
Fixed Branches: MOODLE_20_STABLE

Sub-Tasks  All   Open   
 Sub-Task Progress: 

 Description  « Hide
We use Magpie for rss parsing and download now - is is buggy and not maintained :-(

There is a better LGPL alternative - see http://simplepie.org/


 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Petr Skoda made changes - 17/Dec/06 11:00 PM
Field Original Value New Value
Summary Use simplepie insteda of magpie for rss parsing Use simplepie instead of magpie for rss parsing
Juan Segarra Montesinos added a comment - 11/Mar/08 01:41 AM
> is is buggy and not maintained

In fact, google reader's shared item feed isn't parsed ok with magpie. I've tested it with simplepie and works great.

any plans to change this?


Eloy Lafuente (stronk7) made changes - 15/Mar/08 12:54 AM
Link This issue has been marked as being related by MDL-13932 [ MDL-13932 ]
Charles Fulton added a comment - 18/Jul/08 12:07 AM
Includes a patch file for the rss_client block and a wrapper for SimplePie. Patched against 1.9.2

Charles Fulton made changes - 18/Jul/08 12:07 AM
Attachment simplerss.zip [ 14573 ]
Charles Fulton added a comment - 18/Jul/08 12:09 AM
We've cooked up a patch for 1.9.2 that uses the SimplePie library. There's still an issue with iTunesU streams, but that might be better handled in its own block.

Kenneth Newquist added a comment - 25/Feb/09 06:49 PM
+1 on swapping out Magpie for SimplePie RSS. We've run into a number of RSS parsing issues with Magpie. Those issues aren't likely to go away anytime soon, as Magpie was last updated in 2005.

SimplePie RSS on the other hand was last updated in December 2008. We've been using SimplePie instead of Magpie since this patch was rolled in July without problems.


Kenneth Newquist added a comment - 25/Feb/09 06:50 PM
FYI – this remains an issue with Moodle 1.9.4, so the ticket should be updated accordingly. The patch still works just fine with that version.

Dan Poltawski made changes - 12/Apr/09 06:34 AM
Assignee Petr Skoda [ skodak ] Dan Poltawski [ poltawski ]
Dan Poltawski committed 4 files to 'Moodle CVS' - 13/Apr/09 11:29 PM
Adding SimplePie feed parsing library MDL-7946, MDL-13932

To replace unmaintained magipie. Simplepie is actively maintained has some
nice features such as feed autodisovery. Implemented a simple extended class
which uses the Moodle core curl class from filelib.

Added unit test using the moodle.org sample files. Please note these tests will
fail if moodle can't make http connections out, so ensure proxy settings
etc are correct.
ADD lib/simplepie/simplepie.inc   Rev. 1.1    (+0 -0 lines)
ADD lib/simplepie/readme_moodle.txt   Rev. 1.1    (+0 -0 lines)
ADD lib/simpletest/testrss.php   Rev. 1.1    (+0 -0 lines)
ADD lib/simplepie/moodle_simplepie.php   Rev. 1.1    (+0 -0 lines)
Dan Poltawski committed 2 files to 'Moodle CVS' - 14/Apr/09 12:00 AM
simplepie: fix class name caseing: MDL-7946, MDL-13932
MODIFY lib/simpletest/testrss.php   Rev. 1.2    (+3 -3 lines)
MODIFY lib/simplepie/moodle_simplepie.php   Rev. 1.2    (+4 -4 lines)
Mark Pearson added a comment - 16/Jul/09 10:20 PM
Could not this Simplepie patch be rolled into 1.9.6? Certainly it should be used in 2.0 I would have thought.

Dan Poltawski committed 2 files to 'Moodle CVS' - 27/Jul/09 10:18 PM
lib/simplepie: Improve Integration MDL-7946, MDL-13932

Added more unit tests, improved style and fixed:
- Failed behaviour of redirects
- Incorrect behaviour on feed retrival failure
- Ensured rss cache clear for unit test setup
MODIFY lib/simplepie/moodle_simplepie.php   Rev. 1.4    (+47 -19 lines)
MODIFY lib/simpletest/testrss.php   Rev. 1.4    (+54 -9 lines)
Dan Poltawski committed 3 files to 'Moodle CVS' - 29/Jul/09 09:44 PM
block_rss_client: MDL-13932/MDL-7946 - Switch to use Simplepie

Simplepie is actively maintained and supports a broader range of feeds
MODIFY blocks/rss_client/viewfeed.php   Rev. 1.2    (+8 -19 lines)
MODIFY blocks/rss_client/block_rss_client.php   Rev. 1.95    (+195 -172 lines)
MODIFY blocks/rss_client/editfeed.php   Rev. 1.3    (+6 -9 lines)
Dan Poltawski committed 13 files to 'Moodle CVS' - 30/Jul/09 10:49 PM
Remove lib/magpie: MDL-7946/MDL-13932

It is no longer maintained and simplepie has
replaced it as a maintained and robust alternative
DEL lib/magpie/Attic/README   Rev. 1.2    (+0 -0 lines)
DEL lib/magpie/Attic/README_MOODLE.txt   Rev. 1.5    (+0 -0 lines)
DEL lib/magpie/Attic/cookbook   Rev. 1.2    (+0 -0 lines)
DEL lib/magpie/Attic/rss_cache.inc   Rev. 1.3    (+0 -0 lines)
DEL lib/magpie/Attic/rss_parse.inc   Rev. 1.4    (+0 -0 lines)
DEL lib/magpie/htdocs/Attic/cookbook.html   Rev. 1.2    (+0 -0 lines)
MODIFY lib/thirdpartylibs.xml   Rev. 1.13    (+0 -7 lines)
DEL lib/magpie/Attic/AUTHORS   Rev. 1.2    (+0 -0 lines)
DEL lib/magpie/Attic/TROUBLESHOOTING   Rev. 1.2    (+0 -0 lines)
DEL lib/magpie/htdocs/Attic/index.html   Rev. 1.2    (+0 -0 lines)
DEL lib/magpie/Attic/rss_utils.inc   Rev. 1.4    (+0 -0 lines)
DEL lib/magpie/Attic/rss_fetch.inc   Rev. 1.10    (+0 -0 lines)
DEL lib/magpie/Attic/CHANGES   Rev. 1.2    (+0 -0 lines)
Dan Poltawski added a comment - 30/Jul/09 10:52 PM
I have now made the switch to simplepie in the rss_feed block and removed magpie.

There are also unit tests for simplepie - see: lib/simpletest/testrss.php


Dan Poltawski made changes - 30/Jul/09 10:52 PM
Resolution Fixed [ 1 ]
Fix Version/s 2.0 [ 10122 ]
Status Open [ 1 ] Resolved [ 5 ]
Dan Poltawski committed 1 file to 'Moodle CVS' - 31/Jul/09 12:11 AM
lib/simplepie MDL-7946 Set magpie HTTP headers with curl

This allows simplepie to set if-modified-since/if-none-match headers
to efficiently test if a feed has been updated without recieving the
whole content
MODIFY lib/simplepie/moodle_simplepie.php   Rev. 1.5    (+8 -0 lines)
Dan Poltawski committed 2 files to 'Moodle CVS' - 31/Jul/09 02:57 AM
lib/simplepie MDL-7946 - improve simplepie defaults

- Specify default low connect timeout in order that 'interactive' pages are
  not slowed down by slow feeds
- Set default cache feed duration of 1 hour

In RSS feed block:
- Try really hard in cron to retreive the feed
- Set the cache duration low in order to help cron refresh the cache
MODIFY blocks/rss_client/block_rss_client.php   Rev. 1.97    (+3 -0 lines)
MODIFY lib/simplepie/moodle_simplepie.php   Rev. 1.6    (+20 -3 lines)