HandlerBase->placeholder() calls to undefined method

Created on 22 August 2017, about 7 years ago
Updated 24 June 2024, 5 months ago

Problem/Motivation

I got this error when I try to add a combined exposed filter with Search API:

The website encountered an unexpected error. Please try again later.
Error: Call to undefined method Drupal\search_api\Plugin\views\query\SearchApiQuery::placeholder() in Drupal\views\Plugin\views\HandlerBase->placeholder() (line 489 of core/modules/views/src/Plugin/views/HandlerBase.php).

Drupal\views\Plugin\views\HandlerBase->placeholder() (Line: 138)
Drupal\views\Plugin\views\filter\Combine->opContains('CONCAT_WS(' ', .entity:commerce_product/variations:entity:sku, ' ', .entity:commerce_product/field_serie, ' ', .entity:commerce_product/title)') (Line: 93)
Drupal\views\Plugin\views\filter\Combine->query() (Line: 1359)
Drupal\views\ViewExecutable->_build('filter') (Line: 1248)
Drupal\views\ViewExecutable->build() (Line: 390)
Drupal\views\Plugin\views\display\PathPluginBase->execute() (Line: 168)
Drupal\views\Plugin\views\display\Page->execute() (Line: 1616)
Drupal\views\ViewExecutable->executeDisplay('search', Array) (Line: 78)
Drupal\views\Element\View::preRenderViewElement(Array)
call_user_func(Array, Array) (Line: 376)
Drupal\Core\Render\Renderer->doRender(Array, ) (Line: 195)
Drupal\Core\Render\Renderer->render(Array, ) (Line: 226)
Drupal\Core\Render\MainContent\HtmlRenderer->Drupal\Core\Render\MainContent\{closure}() (Line: 574)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 227)
Drupal\Core\Render\MainContent\HtmlRenderer->prepare(Array, Object, Object) (Line: 117)
Drupal\Core\Render\MainContent\HtmlRenderer->renderResponse(Array, Object, Object) (Line: 90)
Drupal\Core\EventSubscriber\MainContentViewSubscriber->onViewRenderArray(Object, 'kernel.view', Object) (Line: 108)
Drupal\Component\EventDispatcher\ContainerAwareEventDispatcher->dispatch('kernel.view', Object) (Line: 158)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 68)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 57)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 99)
Drupal\page_cache\StackMiddleware\PageCache->pass(Object, 1, 1) (Line: 78)
Drupal\page_cache\StackMiddleware\PageCache->handle(Object, 1, 1) (Line: 47)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 50)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 23)
Stack\StackedHttpKernel->handle(Object, 1, 1) (Line: 656)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

But this does not afect search API but QueryPluginBase as HandlerBase calls placeholder over it.

Proposed resolution

So we have to change HandlerBase->placeholder() or add the placeholder method to QueryPluginBase, this last option will break contributed modules.

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Closed: cannot reproduce

Version

11.0 πŸ”₯

Component
ViewsΒ  β†’

Last updated about 3 hours ago

Created by

πŸ‡ͺπŸ‡ΈSpain edurenye

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States smustgrave

    This came up as a daily #bugsmash target.

    I've used combined filters with search api and don't see this error.

    Wonder if there are additional steps? If so can they be added to the issue summary,

  • Status changed to Closed: cannot reproduce 5 months ago
  • πŸ‡¦πŸ‡ΊAustralia pameeela

    Going to close this since there is no recent info on seeing it, or specific steps to test.

Production build 0.71.5 2024