diff --git a/core/modules/node/src/Plugin/Search/NodeSearch.php b/core/modules/node/src/Plugin/Search/NodeSearch.php index c874514..0220d13 100644 --- a/core/modules/node/src/Plugin/Search/NodeSearch.php +++ b/core/modules/node/src/Plugin/Search/NodeSearch.php @@ -587,6 +587,7 @@ public function buildConfigurationForm(array $form, FormStateInterface $form_sta '#type' => 'markup', ); $form['content_ranking']['rankings'][$var]['value'] = array( + '#type' => 'select', '#options' => $options, '#default_value' => isset($this->configuration['rankings'][$var]) ? $this->configuration['rankings'][$var] : 0, ); diff --git a/core/modules/search/src/Tests/SearchRankingTest.php b/core/modules/search/src/Tests/SearchRankingTest.php index 6c86e2b..184ced1 100644 --- a/core/modules/search/src/Tests/SearchRankingTest.php +++ b/core/modules/search/src/Tests/SearchRankingTest.php @@ -102,7 +102,7 @@ public function testRankings() { $this->cronRun(); // Test that the settings form displays the context ranking section. - $this->drupalGet('admin/config/search/settings/manage/node_search'); + $this->drupalGet('admin/config/search/pages/manage/node_search'); $this->assertText(t('Content ranking')); // Check that all rankings are visible and set to 0. @@ -115,8 +115,8 @@ public function testRankings() { foreach ($node_ranks as $node_rank) { // Enable the ranking we are testing. $edit['rankings'] = array($node_rank => array('value' => 10)); - $this->drupalPostForm('admin/config/search/settings/manage/node_search', $edit, t('Save search page')); - $this->drupalGet('admin/config/search/settings/manage/node_search'); + $this->drupalPostForm('admin/config/search/pages/manage/node_search', $edit, t('Save search page')); + $this->drupalGet('admin/config/search/pages/manage/node_search'); $this->assertTrue($this->xpath('//select[@id="edit-rankings-' . $node_rank . '-value"]//option[@value="10"]'), 'Select list to prioritize ' . $node_rank . ' for node ranks is visible and set to 10.'); // Reload the plugin to get the up-to-date values. @@ -131,8 +131,8 @@ public function testRankings() { // Save the final node_rank change then check that all rankings are visible // and have been set back to 0. - $this->drupalPostForm('admin/config/search/settings/manage/node_search', $edit, t('Save search page')); - $this->drupalGet('admin/config/search/settings/manage/node_search'); + $this->drupalPostForm('admin/config/search/pages/manage/node_search', $edit, t('Save search page')); + $this->drupalGet('admin/config/search/pages/manage/node_search'); foreach ($node_ranks as $node_rank) { $this->assertTrue($this->xpath('//select[@id="edit-rankings-' . $node_rank . '-value"]//option[@value="0"]'), 'Select list to prioritize ' . $node_rank . ' for node ranks is visible and set to 0.'); }