I've found that if the user searches for a space ' ', the following error is returned:

The website encountered an unexpected error. Please try again later.
Error: Call to a member function setConjunction() on null in Drupal\search_api\Plugin\views\filter\SearchApiFulltext->query() (line 308 of modules/contrib/search_api/src/Plugin/views/filter/SearchApiFulltext.php).

This is because getParseMode returns NULL if the query should fail, but setConjunction is being performed on it.

I've attached a patch that checks if the query should fail, if TRUE then do not try and set the conjunction.

Comments

mattgill created an issue. See original summary.

mattgill’s picture

StatusFileSize
new634 bytes
drunken monkey’s picture

StatusFileSize
new1.18 KB

Ah, thanks a lot for pointing this out! And more thanks for already providing a patch!
Everywhere else (I hope) we were careful, but seems this slipped through.
However, I think it the query was aborted, we can just do away with that whole method, since it would be pretty pointless at that point.
Patch attached, please test/review!

mattgill’s picture

Yes works for me! Look forward to the next release!!

drunken monkey’s picture

Status: Needs review » Fixed

Good to hear, thanks for reporting back!
Committed.

Status: Fixed » Closed (fixed)

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