In function template_preprocess_search_api_page_results(array &$variables) Search API Pages is asking the index to load its items. If the item does not exist anymore it is still returned from loadItems and Search API Pages is happily trying to render it which raises a Fatal Error. If the same search is fired once again it works beacuase Search API has then marked the item as deleted.

The fatal error is only raised when the results are not rendered entities.

Patch attached.

CommentFileSizeAuthor
unkownitems-search_api_pages.patch919 bytesjseffel

Comments

drunken monkey’s picture

Status: Active » Needs review

Makes a lot of sense, thanks for reporting and for the patch!
I'll just leave it open for now to see whether anyone else wants to comment and then commit it.

drunken monkey’s picture

Status: Needs review » Fixed

Committed.
Thanks again!

Status: Fixed » Closed (fixed)

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