It has logic to check if the creation of a search query object failed and if so, does not execute the query.

The check is however only in execute(), build() is called before and results in a fatal error if for example the index is disabled.

CommentFileSizeAuthor
search-api-views-query-abort.patch600 bytesBerdir
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Berdir’s picture

About those test fails (in HEAD)

We had similar problems in https://www.drupal.org/node/2385503, and we figured out that testbot doesn't find test modules in tests/modules, when we moved our test modules out of there, it didn't have any problems at all.

That is a core/testbot bug that has to be fixed, but it might be a workaround that you want to do for now..

drunken monkey’s picture

Component: Framework » Views integration
Status: Needs review » Fixed

Looks good, thanks! Committed.
I guess a test for that wouldn't really be possible in our existing ViewsTest, we'd probably need a unit test for that … So let's leave that out for now.

And thanks a lot for the tip with the testbot failures! I immediately tried it out, over in #2386357-1: Fix testbot failures. Let's hope for the best …

  • drunken monkey committed 6dbf410 on 8.x-1.x authored by Berdir
    Issue #2386309 by Berdir: Fixed fatal error during Views query build()...

Status: Fixed » Closed (fixed)

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

Status: Closed (fixed) » Needs work

The last submitted patch, search-api-views-query-abort.patch, failed testing.

Berdir’s picture

Status: Needs work » Closed (fixed)

Aww, testbot.