I have serious problem after my last update. All my site working well except search. When I try to search from search block or go to views list and edit my search results view, I get below error.

The website encountered an unexpected error. Try again later.

Drupal\Component\Plugin\Exception\PluginException: The plugin (search_api_none) did not specify an instance class. in Drupal\Component\Plugin\Factory\DefaultFactory::getPluginClass() (line 79 of core/lib/Drupal/Component/Plugin/Factory/DefaultFactory.php).
Drupal\Core\Plugin\Factory\ContainerFactory->createInstance('search_api_none', Array) (Line: 83)
Drupal\Component\Plugin\PluginManagerBase->createInstance('search_api_none') (Line: 824)
Drupal\views\Plugin\views\display\DisplayPluginBase->getPlugin('cache') (Line: 1476)
Drupal\views\ViewExecutable->execute(NULL) (Line: 1514)
Drupal\views\ViewExecutable->render() (Line: 201)
Drupal\views\Plugin\views\display\Page->execute() (Line: 1690)
Drupal\views\ViewExecutable->executeDisplay('page_1', Array) (Line: 81)
Drupal\views\Element\View::preRenderViewElement(Array)
call_user_func_array(Array, Array) (Line: 113)
Drupal\Core\Render\Renderer->doTrustedCallback(Array, Array, 'Render #pre_render callbacks must be methods of a class that implements \Drupal\Core\Security\TrustedCallbackInterface or be an anonymous function. The callback was %s. See https://www.drupal.org/node/2966725', 'exception', 'Drupal\Core\Render\Element\RenderCallbackInterface') (Line: 886)
Drupal\Core\Render\Renderer->doCallback('#pre_render', Array, Array) (Line: 431)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 248)
Drupal\Core\Render\Renderer->render(Array, ) (Line: 238)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 637)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 239)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object) (Line: 128)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object)
call_user_func(Array, Object, 'kernel.view', Object) (Line: 111)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch(Object, 'kernel.view') (Line: 186)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 53)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 28)
Drupal\Core\StackMiddleware\ContentLength->handle(Object, 1, 1) (Line: 116)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 90)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 36)
Drupal\Core\StackMiddleware\AjaxPageState->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 741)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

I try to find some solution here at issue lists but I just find some old posts.

Comments

tarasiadis created an issue. See original summary.

tarasiadis’s picture

The above return error done when I try to search a term.

When I try to edit my search view I get bellow error.

The website encountered an unexpected error. Try again later.

Drupal\Component\Plugin\Exception\PluginException: The plugin (search_api_none) did not specify an instance class. in Drupal\Component\Plugin\Factory\DefaultFactory::getPluginClass() (line 79 of core/lib/Drupal/Component/Plugin/Factory/DefaultFactory.php).
Drupal\Core\Plugin\Factory\ContainerFactory->createInstance('search_api_none', Array) (Line: 83)
Drupal\Component\Plugin\PluginManagerBase->createInstance('search_api_none') (Line: 824)
Drupal\views\Plugin\views\display\DisplayPluginBase->getPlugin('cache') (Line: 1287)
Drupal\views\Plugin\views\display\DisplayPluginBase->optionsSummary(Array, Array) (Line: 148)
Drupal\views\Plugin\views\display\Block->optionsSummary(Array, Array) (Line: 63)
Drupal\ctools_views\Plugin\Display\Block->optionsSummary(Array, Array) (Line: 596)
Drupal\views_ui\ViewEditForm->getDisplayDetails(Object, Array) (Line: 396)
Drupal\views_ui\ViewEditForm->getDisplayTab(Object) (Line: 213)
Drupal\views_ui\ViewEditForm->form(Array, Object) (Line: 107)
Drupal\Core\Entity\EntityForm->buildForm(Array, Object) (Line: 42)
Drupal\views_ui\ViewFormBase->buildForm(Array, Object)
call_user_func_array(Array, Array) (Line: 536)
Drupal\Core\Form\FormBuilder->retrieveForm('view_edit_form', Object) (Line: 284)
Drupal\Core\Form\FormBuilder->buildForm(Object, Object) (Line: 48)
Drupal\Core\Entity\EntityFormBuilder->getForm(Object, 'edit', Array) (Line: 220)
Drupal\views_ui\Controller\ViewsUIController->edit(Object, NULL)
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 637)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 181)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 53)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 28)
Drupal\Core\StackMiddleware\ContentLength->handle(Object, 1, 1) (Line: 116)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 90)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 36)
Drupal\Core\StackMiddleware\AjaxPageState->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 741)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)
tarasiadis’s picture

I have apply this patch https://www.drupal.org/project/search_api/issues/3563795 and works ok now

drunken monkey’s picture

Status: Active » Postponed (maintainer needs more info)

Thanks for reporting this bug and sorry it took me so long to get back to you.

Something seems to be very strange, though. For one, the search_api_none cache plugin is always part of the module so it’s rather inexplicable how that would trigger an exception.
Then, the patch you reference just adds a catch for \Throwable to a block that already catches PluginException – if a PluginException is your problem then there is no way that that patch would fix it.

Does the problem still appear for you with the latest version of this module?
And what version of Drupal are you using?