hi!
i'm using search api solr dev
and found this error :
Fatal error: Class 'Apache_Solr_Document' not found in /home/valandci/www/sites/all/modules/search_api_solr/service.inc on line 192
when i try to "index now" on this page /admin/config/search/search_api/index/node_search/status
it's my first time with apache solr...
thx

Comments

drunken monkey’s picture

Did you correctly follow the instructions in the INSTALL.txt file and download the SolrPhpClient?
I just yesterday made some changes, but those shouldn't have touched that file. I take it from your description that this hasn't worked for you before (i.e., it failed when you first tried it)?

gagarine’s picture

I got the same error because I forget to copy the SolrPhpClient. After reading the INSTALL.TXT and follow the instructions this error disappear.

hook_requirements should display a message error in the administration but I don't remind to see one (perhaps is because I first install a version without the hook).

"Fatal error" is not very pretty so perhaps making a test before calling the class?

drunken monkey’s picture

This case should now display a more helpful exception message, instead of a fatal error. Since this is called in several different cases, there really is no better option.

It's a bit unclear to me, though, how you managed to look at the requirements or create a Solr server in the first place. Both actions triggered a fatal error for me.

Anyways, @ mageonyme: Please set status to "fixed" unless the error perseveres after following all instruction in INSTALL.txt.

mikejoconnor’s picture

Status: Active » Needs review
StatusFileSize
new854 bytes

I think the root problem is a bug in hook_requirements. The severity is being set to title. See the attached patch.

drunken monkey’s picture

Title: Fatal error: Class 'Apache_Solr_Document' not found » Fix hook_requirements()
Status: Needs review » Fixed

Oh, how could I miss that one?
Committed your patch, thanks a bunch!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.