Skip to content
Snippets Groups Projects
Commit 61cd08be authored by Jonathan Sacksick's avatar Jonathan Sacksick Committed by Matt Glaman
Browse files

Issue #3181689 by jsacksick: JSON Search API facets broken with latest Facets release

parent 81547bb7
No related branches found
No related tags found
No related merge requests found
...@@ -130,12 +130,9 @@ class JsonApiQueryString extends QueryString { ...@@ -130,12 +130,9 @@ class JsonApiQueryString extends QueryString {
// Set the url alias from the facet object. // Set the url alias from the facet object.
$this->urlAlias = $facet->getUrlAlias(); $this->urlAlias = $facet->getUrlAlias();
// Grab the original field for use in the filter URLs. $facet_source_path = $facet->getFacetSource()->getPath();
$request = $this->request; $request = $this->getRequestByFacetSourcePath($facet_source_path);
// We do not need to use ::getUrlForRequest, as we know this URL processor $requestUrl = $this->getUrlForRequest($facet_source_path, $request);
// is being executed on a JSON:API Search API resource.
$requestUrl = Url::createFromRequest($request);
$routeParameters = $this->getUrlRouteParameters();
$original_filter_params = []; $original_filter_params = [];
foreach ($this->getActiveFilters() as $facet_id => $value) { foreach ($this->getActiveFilters() as $facet_id => $value) {
...@@ -252,9 +249,6 @@ class JsonApiQueryString extends QueryString { ...@@ -252,9 +249,6 @@ class JsonApiQueryString extends QueryString {
} }
$result_get_params->add($params); $result_get_params->add($params);
} }
if (!empty($routeParameters)) {
$url->setRouteParameters($routeParameters);
}
if ($result_get_params->all() !== [$this->filterKey => []]) { if ($result_get_params->all() !== [$this->filterKey => []]) {
$new_url_params = $result_get_params->all(); $new_url_params = $result_get_params->all();
// Set the new url parameters. // Set the new url parameters.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment