I get the following error when I run cron, but not when I index manually via the Index's status page.
PHP Fatal error: Call to a member function value() on a non-object in sites/all/modules/contrib/search_api/search_api.module on line 1552
Drush command terminated abnormally due to an unrecoverable error. [error]
Error: Call to a member function value() on a non-object in
sites/all/modules/contrib/search_api/search_api.module,
line 1552
I tried debugging but it was difficult because of the recursive nature of the function and debug_backtrace() only works if you pass it the DEBUG_BACKTRACE_IGNORE_ARGS option.
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | 1471310--unset-field-8.patch | 2.72 KB | drunken monkey |
Comments
Comment #1
reptilex commentedI have the same issue with the search_api_pages module. So it makes it completely useless. It worked before I updated everything to the new version, the version I was running was at least 8 months old but it worked.
Comment #2
jsacksick commentedCan you provide more information ? Your index configuration .... What are you trying to do exactly ...
Comment #3
reptilex commentedI'm using the profile2 module to built an alumni database. I was using the search api to look in different fields of the profiles. I'm only using the dbsearch module. Since I updated I get the error message everytime I try to do a search. Indexing works fine. Of course my error does not come from the drush app but directly from the site. My index configuration is_
Some fields are checkboxes. But like I said, the indexing works fine. The problem appears when I try to do a search.
I get:
Fatal error: Call to a member function value() on a non-object in /website/sites/all/modules/search_api/search_api.module on line 1552Do you need more info? Just let me know.
Comment #4
Anonymous (not verified) commentedI have the same issue.
I do a sidewide search using search api pages and get the above error.
Setup:
Observations
Comment #5
Bevan commentedI think in my case an index was corrupt. Try disabling and re-enabling ALL of your drupal-solr indexes.
Comment #6
reptilex commentedI don't think that's it, at least not in my case. I deleted all indexes and created them anew.
Comment #7
reptilex commentedMantainer needs more info? What more info do you require? Let me know and I will give it to you, gladly.
Comment #8
drunken monkeyI take it you have tried with the latest devs (Search API, Entity API and Profile2)? Then please see if the attached patch fixes your problem.
Comment #9
Anonymous (not verified) commentedFor some reason I also encountered this 'bug'. I'm using a custom entity and the error happened when indexing the basic 'title' field.
I am not using Profile2, but a custom module for a custom entity, and using
search_api 7.x-1.2
Entity API 7.x-1.0-rc3
Applying the patch from #8 fixed my issue!
Comment #10
reptilex commentedSadly it did not fix mine. Now my search results are not shown. The line for the results says I have results, but nothing is shown. The good thing is I don't get any errors anymore. But no fix.
Comment #11
jaydub commentedRan into this error just now myself. I have a fresh instance with an empty index. I was able to get to about 45% indexed via some cron runs before hitting the error. I've applied the patch and so far no more errors and indexing is continuing.
Comment #12
jackbravo commentedOk, this also fixed it for me. So that's three cases where this fixes the issue.
Still, there seems to be something weird going on. This is my backtrace:
The issue was launched on a $wrapper for a field of type "long text". The field was defined on some node types, but I didn't had any node type with that field on the database.
Comment #13
drunken monkeyThanks for testing, and glad this worked for you.
Also, I'm very sorry I took so long to get back to you.
Anyways, committed.
@ reptilex: If you keep having problems with this, please open another issue and we'll try to get to the bottom of your problem.