Hi,

I receive the white page of death when trying to run cron. Error reporting gives me the following error:

Fatal error: Unsupported operand types in /sites/all/modules/search_api_db/service.inc on line 506

Lines 505 - 506 read:

      case 'decimal':
        return 0 + $value;

I use:

Search API 7.x-1.x-dev
Database search 7.x-1.0-beta2

Comments

tecjam’s picture

Status: Active » Closed (cannot reproduce)

Well, I simply comment out those 2 lines, ran the cron again, uncommented the lines, retried cron and it works again now. Not sure why this happened.

tecjam’s picture

Status: Closed (cannot reproduce) » Active

Ok, I closed this a bit too early.

If I go into the search_api index settings and clear the index and re-index, I receive the same error.

I am indexing:

- node id: as integer
- content type: as string
- status: as integer
- 4 different Taxonomie-Terms
- on/off checkbox as boolean

amateescu’s picture

Project: Search API » Search API Database Search
Component: Framework » Code

Moving to the right queue.

zambrey’s picture

I've also run into this problem lately and managed to fix it by re-saving field definition.
Hope it helps anyone.

garethhallnz’s picture

I can confirm the #4 worked for me too.

graemehunter’s picture

#4 worked for me too.

Also note that I didn't see the initial error in the drupal errors and warnings report, I just had a white page of death when running cron manually. Running cron via drush produced the title error message, that led me here.

drunken monkey’s picture

Status: Active » Fixed

It's very probably that an old bug caused some stale data in the server which thus had the wrong multiplicity for one of the taxonomy term fields. Everyone encountering this shouldre-save their field settings (maybe changing something back and forth to avoid the "No settings changed." note) and see whether this fixes the problem.

Otherwise, please re-open. (And also try to narrow down the cause by unchecking field by field to see which field triggers the error.)

thetech249’s picture

am I not catching something how would I go about re-saving field definitions? I have looked all over to find how to do that and can't find anything. Thanks.

Status: Fixed » Closed (fixed)

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

papirrin’s picture

Any news?

Piyushagr’s picture

I got same error when run batch process.

rudiedirkx’s picture

#4 worked for me too.

Why the weird type casting though? PHP has several valid ways to do this. 0 + $value is 'very cool' (TM), but apparently also fatal sometimes.

pvmchau’s picture

#4 worked for me too. Thanks zambrey :)

codesidekick’s picture

#4 worked for me too. Step by step instructions:

  1. Go to admin/config/search/search_api
  2. On your Database index, click on edit, and click fields
  3. Scroll to the bottom of the fields page and hit 'Save fields'
joshua.boltz’s picture

Issue summary: View changes

Not sure how related it is or not, but I have been recently getting the "unsupported operand types" errors while trying to figure out the page_manager_search module.

After enabling the module (after enabling the core Search module to avoid the missing function error), I tried adjusting some settings on this configuration page.
/admin/config/search/settings
I tried checking the box for Page manager search under Active search modules.
When I run cron, i get the unsupported operand types error. Without that setting checked, cron runs fine.