I marked this as major just because I'm getting them frequently enough in my logs. I'll try and trouble shoot tomorrow, but I wanted to at least get this posted.

Recoverable fatal error: Argument 1 passed to SearchApiIndex::loadItems() must be of the type array, null given, called in /home/.../public_html/sites/all/modules/search_api_page/search_api_page.pages.inc on line 226 and defined in SearchApiIndex->loadItems() (line 997 of /home/.../public_html/sites/all/modules/search_api/includes/index_entity.inc).

Warning: array_keys() expects parameter 1 to be array, null given in template_preprocess_search_api_page_results() (line 226 of /home/.../public_html/sites/all/modules/search_api_page/search_api_page.pages.inc).

Notice: Undefined index: results in template_preprocess_search_api_page_results() (line 226 of /home/.../public_html/sites/all/modules/search_api_page/search_api_page.pages.inc).

Comments

drunken monkey’s picture

Title: Recoverable fatal error: Argument 1 passed to SearchApiIndex::loadItems() must be of the type array, null given » Fix theming code to not try to load results if there are none
Project: Search API » Search API Pages
Version: 7.x-1.11 » 7.x-1.x-dev
Component: Framework » Code
Priority: Major » Normal
Status: Active » Needs review
StatusFileSize
new1.7 KB

This seems to be a problem in the Search API Pages module, which tries to load the results even when none are returned. The attached patch should fix this, please test/review! (The relevant change is the first, but we should also clean up the other parameters.)

drunken monkey’s picture

Status: Needs review » Fixed

  • Commit b088c33 on 7.x-1.x by drunken monkey:
    Issue #2244981 by drunken monkey: Fixed theming code to not try to load...

Status: Fixed » Closed (fixed)

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