Keyword

Fatal error: Cannot redeclare class SimplePie in XXXXXXXXX

  • erikas.boy
  • erikas.boy's Avatar Topic Author
  • Offline
  • New Member
More
13 years 11 months ago #37299 by erikas.boy
Hello,
So, I did some looking around, as I ran into this problem as well.  Initially I just disabled the other .rss feed I was using, and the problem went away.  Unfortunately, I also wanted to use mod_twitterfeed which caused the issue to come back.  After some trawling google, this is the solution I came up with.

In helper.php (line 28 for me)

Change
// Includes
require_once(dirname(__FILE__).DS.'includes'.DS.'simplepie'.DS.'simplepie.inc');

to
// Includes
if(!class_exists('SimplePie')){		require_once(dirname(__FILE__).DS.'includes'.DS.'simplepie'.DS.'simplepie.inc');
}

With me?  Okay, that caused this error:

Fatal error: Call to undefined method SimplePie::set_item_limit() in xxxxxx/modules/mod_jw_srfr/helper.php on line 45

So I went back into help.php, and commented out line 45
$sourceFeed->set_item_limit(intval($perFeedItems));

which got everything working.  I fear it means I've now lost the ability to limit the number of posts, but I'll keep working on that to see what I can do.

Hope this helps anybody else in this predicament, and possibly might give the devs some inspiration to add these fixes to future releases.  I know you guys get paid nothing to make this module; thanks for all the work you do on it.

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum