Commit 4fabe1d3 authored by borisson_'s avatar borisson_ Committed by StryKaizer

Issue #2913636 by borisson_, dcam: ResetFacetsProcessor generates incorrect...

Issue #2913636 by borisson_, dcam: ResetFacetsProcessor generates incorrect URLs for subdirectory sites
parent ec8066c3
......@@ -55,7 +55,7 @@ class ResetFacetsProcessor extends ProcessorPluginBase implements BuildProcessor
}
}
$url = Url::fromUserInput($request->getRequestUri());
$url = Url::createFromRequest($request);
$url->setOptions(['query' => $query_params]);
$item = (new Link($configuration['settings']['link_text'], $url))->toRenderable();
......
......@@ -488,6 +488,7 @@ class IntegrationTest extends FacetsTestBase {
];
$this->drupalPlaceBlock('facets_summary_block:reset_facets', $blockConfig);
$this->drupalGet('search-api-test-fulltext');
$this->assertSession()->addressEquals('/search-api-test-fulltext');
$this->assertSession()->pageTextContains('Displaying 5 search results');
$this->assertSession()->pageTextNotContains('Reset facets');
......@@ -497,6 +498,8 @@ class IntegrationTest extends FacetsTestBase {
$this->assertSession()->pageTextContains('Reset facets');
$this->clickLink('Reset facets');
$this->assertSession()->statusCodeEquals(200);
$this->assertSession()->addressEquals('/search-api-test-fulltext');
$this->assertSession()->pageTextContains('Displaying 5 search results');
$this->assertSession()->pageTextNotContains('Reset facets');
}
......
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