Skip to content
Snippets Groups Projects
Commit f9662844 authored by Jimmy Henderickx's avatar Jimmy Henderickx Committed by Joris Vercammen
Browse files

Issue #2933799 by StryKaizer: PreQueryProcessers are initialized twice

parent 991d2eb3
No related branches found
No related tags found
No related merge requests found
......@@ -213,10 +213,8 @@ class DefaultFacetManager {
$this->facets = $this->getEnabledFacets();
foreach ($this->facets as $facet) {
foreach ($facet->getProcessorsByStage(ProcessorInterface::STAGE_PRE_QUERY) as $processor) {
$processor_config = $processor->getConfiguration();
$processor_config['facet'] = $facet;
/** @var \Drupal\facets\Processor\PreQueryProcessorInterface $pre_query_processor */
$pre_query_processor = $this->processorPluginManager->createInstance($processor->getPluginDefinition()['id'], $processor_config);
$pre_query_processor = $facet->getProcessors()[$processor->getPluginDefinition()['id']];
if (!$pre_query_processor instanceof PreQueryProcessorInterface) {
throw new InvalidProcessorException("The processor {$processor->getPluginDefinition()['id']} has a pre_query definition but doesn't implement the required PreQueryProcessorInterface interface");
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment