Cannot redeclare class SimplePie

j0k3z - June 21, 2009 - 20:00
Project:Activity Stream
Version:6.x-1.0-rc2
Component:Code
Category:bug report
Priority:normal
Assigned:Unassigned
Status:needs review
Description

As soon as turned on this module I get this error when I visit my admin page "Fatal error: Cannot redeclare class SimplePie"

I already have SimplePie loaded because I am using the feedapi module to parse RSS feeds as nodes on my website. I think your module is trying to load it again and its causing this error.

#1

jchatard - July 7, 2009 - 13:20
Status:active» needs review

I encountered the same problem, so I wrote a little patch which first checks if FeedAPI SimplePie parser is enabled and that simplepie.inc is present.

If not, then try detect simplepie.inc from activitystream_feed directory.

If not, then show warning message indicating that SimplePie must be installed.

Hope it helps!
Jérémy

AttachmentSize
detect_feedapi_simplepie_parser.diff 3.94 KB

#2

akalsey - July 7, 2009 - 14:59

The 2.0 branch does almost exactly that. It allows a user to install the simplepie core module and falls back on it's own copy of simplepie as a last resort.

#3

jchatard - July 8, 2009 - 08:36

Ok, I didn't know that. I attached an updated patch, there was an error in the previous one.

From your answer I have 2 questions:
- Is 2.0 branch usable, or stable enough to be put on production sites?
- Is there any plan to put such functionality in 1.0 branch ?

Thank you.

Jérémy

AttachmentSize
detect_simplepie_from_feedapi.diff 4.01 KB

#4

akalsey - November 9, 2009 - 22:13

Simplepie 2 is now stable enough to be used in production. If someone wants to backport the Simplepie behaviors from 2.x to 1.x and supply a patch, I'd be happy to commit and push a new 1.x release.

 
 

Drupal is a registered trademark of Dries Buytaert.