diff --git a/README.md b/README.md index 771919b..3510525 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ # [extensible search](https://packagist.org/packages/nglasl/silverstripe-extensible-search) -_The current release is **4.1.3**_ +_The current release is **4.1.4**_ > This module allows user customisation and developer extension of a search page instance, including analytics and suggestions. diff --git a/src/services/ExtensibleSearchService.php b/src/services/ExtensibleSearchService.php index ebcf79e..c2acdc1 100644 --- a/src/services/ExtensibleSearchService.php +++ b/src/services/ExtensibleSearchService.php @@ -64,7 +64,7 @@ public function logSuggestion($term, $pageID) { // Make sure the search suggestions are enabled, and the search matches the minimum autocomplete length. - if(!Config::inst()->get('ExtensibleSearchSuggestion', 'enable_suggestions') || (strlen($term) < 3)) { + if(!Config::inst()->get(ExtensibleSearchSuggestion::class, 'enable_suggestions') || (strlen($term) < 3)) { return null; } diff --git a/tests/UnitTests.php b/tests/UnitTests.php index b77a87a..875e118 100644 --- a/tests/UnitTests.php +++ b/tests/UnitTests.php @@ -79,22 +79,9 @@ public function testSearchResults() { public function testAnalytics() { - // The full-text search needs to be selected. - $page = ExtensibleSearchPage::get()->first(); - $page->SearchEngine = 'Full-Text'; - $page->write(); $controller = ModelAsController::controller_for($page); - // Instantiate a searchable page. - - $searchable = SiteTree::create( - array( - 'Title' => 'Test' - ) - ); - $searchable->write(); - // This shouldn't find anything, since the query doesn't match the page. $data = array(