Hey,
in the Plug in search_api/src/Plugin/views/argument/SearchApiFulltext.php in the function buildOptionsForm() the plugin calls for getFulltextFields() which then tries to call $this->query->getIndex().

However: $this->query is not populated at this point. I checked the D7 version, and there it is neither, instead $index = search_api_index_load(substr($this->table, 17)); is used.

I built something similar here and will attach it as a patch. It is not pretty...

Comments

ChristianAdamski created an issue. See original summary.

christianadamski’s picture

Issue summary: View changes
christianadamski’s picture

Status: Active » Needs review
StatusFileSize
new1017 bytes

Status: Needs review » Needs work

The last submitted patch, 3: 2557295-1-load-index-manually-when-necessary.patch, failed testing.

christianadamski’s picture

Status: Needs work » Needs review
StatusFileSize
new775 bytes

Rerolling

Status: Needs review » Needs work

The last submitted patch, 5: 2557295-5-load-index-manually-when-necessary.patch, failed testing.

The last submitted patch, 3: 2557295-1-load-index-manually-when-necessary.patch, failed testing.

drunken monkey’s picture

Status: Needs work » Needs review
StatusFileSize
new775 bytes

Re-attaching your patch, since the fails were probably not caused by it.

And yes, the Views integration is pretty shaky at the moment. But every bit helps, so thanks for that!

drunken monkey’s picture

StatusFileSize
new7.16 KB

Rehauled the patch to also put the index loading logic into a central place.

Status: Needs review » Needs work

The last submitted patch, 10: 2557295-10--views_unset_query.patch, failed testing.

drunken monkey’s picture

Status: Needs work » Needs review
StatusFileSize
new7.23 KB

Re-roll.

drunken monkey’s picture

Status: Needs review » Fixed

OK, looks good. Committed.
Thanks again!

Status: Fixed » Closed (fixed)

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