FilterEditor: Use a new url from request when redirecting searches
Creating a new url has the benefit that all framework params are still there. `$this->url()` however returns a url that's already mangled and parameter preservation does not work for framework params. This is not quite the correct fix. But the entire parameter handling here is way too convoluted.
This commit is contained in:
parent
46c6201a21
commit
60c3fd6406
|
@ -285,12 +285,10 @@ class FilterEditor extends AbstractWidget
|
|||
}
|
||||
}
|
||||
|
||||
$url = $this->url()->setQueryString(
|
||||
$filter->toQueryString()
|
||||
)->addParams($preserve);
|
||||
if ($modify) {
|
||||
$url->getParams()->add('modifyFilter');
|
||||
}
|
||||
$url = Url::fromRequest()->onlyWith($this->preserveParams);
|
||||
$urlParams = $url->getParams();
|
||||
$url->setQueryString($filter->toQueryString());
|
||||
$url->getParams()->mergeValues($urlParams->toArray(false));
|
||||
$this->redirectNow($url);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue