I just updated to the recent release of search_api_autocomplete, and have started getting an exception (below) on every page:

Drupal\Component\Plugin\Exception\PluginNotFoundException: The "" plugin does not exist. in Drupal\Core\Plugin\DefaultPluginManager->doGetDefinition() (line 52 of core/lib/Drupal/Component/Plugin/Discovery/DiscoveryTrait.php).
Drupal\Core\Plugin\DefaultPluginManager->getDefinition(NULL) (Line: 16)
Drupal\Core\Plugin\Factory\ContainerFactory->createInstance(NULL, Array) (Line: 84)
Drupal\Component\Plugin\PluginManagerBase->createInstance(NULL, Array) (Line: 159)
Drupal\search_api_autocomplete\Entity\Search->getSuggesterInstance() (Line: 185)
Drupal\search_api_autocomplete\Entity\Search->supportsAutocompletion() (Line: 150)
Drupal\search_api_autocomplete\Controller\AutocompleteController->access(Object, Object) (Line: 71)
search_api_autocomplete_form_views_exposed_form_alter(Array, Object, 'views_exposed_form') (Line: 501)
...

Looking a bit further, Search.php's getSuggesterInstance() method is referencing $this->suggester which is NULL in my case. I'm using a multi-index search view, could that be related? I also just updated search_api to the recent release so it's also possible that has affected something.

Comments

bmcclure created an issue. See original summary.

bmcclure’s picture

Turns out I just needed to visit the Autocomplete tab of my search indexes and re-save the settings. There were errors on the settings page when I loaded it, and after saving it once, but then it must have set valid config and no more errors came up.

bmcclure’s picture

Now I'm suddenly also getting no autocomplete results where they used to work, but maybe that is a separate issue.

bmcclure’s picture

Still troubleshooting the lack of results after the update. So far, I've narrowed it down to Database.php in search_api, within getAutocompleteSuggestions(), $word_query is ending up NULL, causing the function to return an empty result set.

drunken monkey’s picture

Status: Active » Closed (works as designed)

As the release notes explain, this module doesn't guarantee an update path during Alpha phase. Please try re-creating your autocomplete configuration from scratch if they don't work after an update (or manually edit the configuration, if you think you know what the problem is).

If the database backend doesn't return the expected suggestions, please create an issue in that issue queue.

bmcclure’s picture

As noted above, the exception was resolved already, and to double-check I uninstalled and reinstalled the module. The issue now is simply that the database backend isn't returning any autocomplete results for me.

I have no way of knowing which module is at fault yet. I'll keep troubleshooting myself until I figure out what's going on so as not to risk creating another issue on the wrong queue. Thank you.

bmcclure’s picture

It's possible that my update to search_api failed to download or deploy in some way. I deleted and reinstalled the files for the latest search_api, and I believe it's resolved my issue. I'll post in that queue if I find it's not fully resolved.