Hi,

I can see this module is looking for co-maintainer and it has been a while since someone showed up in the issues, but I'll try before surrender :)

I was trying to use SimplePie within D7. I installed the dev release via drush and enabled it. After that, I tried to create a block (php code) that works with the simplepie library to parse some feed items and show them. But the code stop exactly at the point where we call the SimplePie class. So it seems like this release is not properly loading the library.

The error is:

Fatal error: Class 'SimplePie' not found in /path/to/drupal/root/modules/php/php.module(80) : eval()'d code on line 24

Any ideas?

Thanks everyone for your contributions to this and other drupal modules :)

Comments

skadu’s picture

Hey Versvs,

I know this is a bit late, but I just managed to get this working (at least from my stand point). Here is what I did.

  • Download the SimplePie Library Here
  • You dont need every file that comes in the zip, so extract it somewhere on your server that you can easily access it to pick and choose the files you need.
    • Alternatively, download it to your computer and open up the zip to pick and choose the files you need.
  • Take the file called autoloader.php and rename it to simple.inc (this is the filename that feeds is looking for)
  • Place the simplepie.inc file in /sites/all/modules/feeds/libraries (feeds looks here for other libraries to make available)
  • At this point you should see SimplePie as an option when selecting a parser on a feeds configuration page.
  • This however does not mean the SimplePie library is loading (as you point out in your issue). If you look at the simplepie.inc (previously called autoloader.php, it is looking for the SimplePie class inside a directory called "library".
  • You need to place the following files in to the /sites/all/modules/feeds/libraries directory:
    • SimplePie.php (located in the SimplePie zip at library/SimplePie.php
    • The entire SimplePie directory (also located in the SimplePie zip at library/SimplePie/)
  • Once I did that, I no longer received the missing class error, and I was able to succesfully import a feed using the SimplePie parser.

A standard disclaimer, I have not tested this thoroughly, and I believe it is possible to place the SimplePie library in the /sites/all/libraries/ directory to get this to work as well. There is some code in the feeds module that scans that directory as well.

Hope that helps.