Commit 59f64069 authored by 5n00py's avatar 5n00py Committed by borisson_

Issue #2994859 by 5n00py: Fix range slider processor's url generation

parent 7bceda93
......@@ -53,7 +53,7 @@ class RangeSliderProcessor extends SliderProcessor implements PreQueryProcessorI
$new_active_filters = $active_filters;
unset($new_active_filters[$facet->getUrlAlias()]);
// Add one generic query filter with the min and max placeholder.
$new_active_filters[$facet->getUrlAlias()][] = '(min:__range_slider_min__,max:__range_slider_max__)';
$new_active_filters[$facet->id()][] = '(min:__range_slider_min__,max:__range_slider_max__)';
$url = \Drupal::service('facets.utility.url_generator')->getUrl($new_active_filters, FALSE);
$result->setUrl($url);
}
......
......@@ -79,6 +79,7 @@ class RangeSliderProcessorTest extends UnitTestCase {
$facet = $this->prophesize(Facet::class);
$facet->getProcessors()->willReturn(['url_processor_handler' => $urlHandler->reveal()]);
$facet->getUrlAlias()->willReturn('animals');
$facet->id()->willReturn('animals');
/** @var \Drupal\facets\Result\ResultInterface[] $results */
$results = [
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment