diff --git a/core/modules/search/lib/Drupal/search/Plugin/SearchIndexingInterface.php b/core/modules/search/lib/Drupal/search/Plugin/SearchIndexingInterface.php index 26edef5556699f66efe9a9ac59993f9838758950..4bc30f8ae1cccec6ba48eacbd7394bd8059b8825 100644 --- a/core/modules/search/lib/Drupal/search/Plugin/SearchIndexingInterface.php +++ b/core/modules/search/lib/Drupal/search/Plugin/SearchIndexingInterface.php @@ -27,7 +27,7 @@ interface SearchIndexingInterface { * * This method is called every cron run if the plugin has been set as * an active search module on the Search settings page - * (admin/config/search/settings). It allows your module to add items to the + * (admin/config/search/pages). It allows your module to add items to the * built-in search index using search_index(), or to add them to your module's * own indexing mechanism. * diff --git a/core/modules/search/lib/Drupal/search/Tests/SearchConfigSettingsFormTest.php b/core/modules/search/lib/Drupal/search/Tests/SearchConfigSettingsFormTest.php index 97030a644ca8a856c8df9cdbaa8526aeb7b48385..25372eb73d1b1b9f8fe1c95a3655b227568de3a3 100644 --- a/core/modules/search/lib/Drupal/search/Tests/SearchConfigSettingsFormTest.php +++ b/core/modules/search/lib/Drupal/search/Tests/SearchConfigSettingsFormTest.php @@ -70,26 +70,26 @@ function setUp() { function testSearchSettingsPage() { // Test that the settings form displays the correct count of items left to index. - $this->drupalGet('admin/config/search/settings'); + $this->drupalGet('admin/config/search/pages'); $this->assertText(t('There are @count items left to index.', array('@count' => 0))); // Test the re-index button. - $this->drupalPostForm('admin/config/search/settings', array(), t('Re-index site')); + $this->drupalPostForm('admin/config/search/pages', array(), t('Re-index site')); $this->assertText(t('Are you sure you want to re-index the site')); - $this->drupalPostForm('admin/config/search/settings/reindex', array(), t('Re-index site')); + $this->drupalPostForm('admin/config/search/pages/reindex', array(), t('Re-index site')); $this->assertText(t('The index will be rebuilt')); - $this->drupalGet('admin/config/search/settings'); + $this->drupalGet('admin/config/search/pages'); $this->assertText(t('There is 1 item left to index.')); // Test that the form saves with the default values. - $this->drupalPostForm('admin/config/search/settings', array(), t('Save configuration')); + $this->drupalPostForm('admin/config/search/pages', array(), t('Save configuration')); $this->assertText(t('The configuration options have been saved.'), 'Form saves with the default values.'); // Test that the form does not save with an invalid word length. $edit = array( 'minimum_word_size' => $this->randomName(3), ); - $this->drupalPostForm('admin/config/search/settings', $edit, t('Save configuration')); + $this->drupalPostForm('admin/config/search/pages', $edit, t('Save configuration')); $this->assertNoText(t('The configuration options have been saved.'), 'Form does not save with an invalid word length.'); } @@ -97,7 +97,7 @@ function testSearchSettingsPage() { * Verifies plugin-supplied settings form. */ function testSearchModuleSettingsPage() { - $this->drupalGet('admin/config/search/settings'); + $this->drupalGet('admin/config/search/pages'); $this->clickLink(t('Edit'), 1); // Ensure that the default setting was picked up from the default config @@ -111,7 +111,7 @@ function testSearchModuleSettingsPage() { // Ensure that the modifications took effect. $this->assertRaw(t('The %label search page has been updated.', array('%label' => 'Dummy search type'))); - $this->drupalGet('admin/config/search/settings/manage/dummy_search_type'); + $this->drupalGet('admin/config/search/pages/manage/dummy_search_type'); $this->assertTrue($this->xpath('//select[@id="edit-extra-type-settings-boost"]//option[@value="ii" and @selected="selected"]'), 'Module specific settings can be changed'); } @@ -146,7 +146,7 @@ function testSearchModuleDisabling() { // Test each plugin if it's enabled as the only search plugin. foreach ($entities as $entity_id => $entity) { // Set this as default. - $this->drupalGet("admin/config/search/settings/manage/$entity_id/set-default"); + $this->drupalGet("admin/config/search/pages/manage/$entity_id/set-default"); // Run a search from the correct search URL. $info = $plugin_info[$entity_id]; @@ -185,7 +185,7 @@ function testSearchModuleDisabling() { $entity->enable()->save(); } // Set the node search as default. - $this->drupalGet('admin/config/search/settings/manage/node_search/set-default'); + $this->drupalGet('admin/config/search/pages/manage/node_search/set-default'); foreach (array('search/node/pizza', 'search/node') as $path) { $this->drupalGet($path); @@ -217,7 +217,7 @@ public function testMultipleSearchPages() { $this->assertDefaultSearch(FALSE); // Ensure that no search pages are configured. - $this->drupalGet('admin/config/search/settings'); + $this->drupalGet('admin/config/search/pages'); $this->assertText(t('No search pages have been configured.')); // Add a search page. @@ -264,14 +264,14 @@ public function testMultipleSearchPages() { 'entities[' . $first_id . '][weight]' => 10, 'entities[' . $second_id . '][weight]' => -10, ); - $this->drupalPostForm('admin/config/search/settings', $edit, t('Save configuration')); + $this->drupalPostForm('admin/config/search/pages', $edit, t('Save configuration')); $this->drupalGet('search'); $elements = $this->xpath('//*[contains(@class, :class)]//a', array(':class' => 'tabs primary')); $this->assertIdentical((string) $elements[0]['href'], url('search/' . $second['path'])); $this->assertIdentical((string) $elements[1]['href'], url('search/' . $first['path'])); // Check the initial state of the search pages. - $this->drupalGet('admin/config/search/settings'); + $this->drupalGet('admin/config/search/pages'); $this->verifySearchPageOperations($first_id, TRUE, FALSE, FALSE, FALSE); $this->verifySearchPageOperations($second_id, TRUE, TRUE, TRUE, FALSE); @@ -318,28 +318,28 @@ public function testMultipleSearchPages() { */ protected function verifySearchPageOperations($id, $edit, $delete, $disable, $enable) { if ($edit) { - $this->assertLinkByHref("admin/config/search/settings/manage/$id"); + $this->assertLinkByHref("admin/config/search/pages/manage/$id"); } else { - $this->assertNoLinkByHref("admin/config/search/settings/manage/$id"); + $this->assertNoLinkByHref("admin/config/search/pages/manage/$id"); } if ($delete) { - $this->assertLinkByHref("admin/config/search/settings/manage/$id/delete"); + $this->assertLinkByHref("admin/config/search/pages/manage/$id/delete"); } else { - $this->assertNoLinkByHref("admin/config/search/settings/manage/$id/delete"); + $this->assertNoLinkByHref("admin/config/search/pages/manage/$id/delete"); } if ($disable) { - $this->assertLinkByHref("admin/config/search/settings/manage/$id/disable"); + $this->assertLinkByHref("admin/config/search/pages/manage/$id/disable"); } else { - $this->assertNoLinkByHref("admin/config/search/settings/manage/$id/disable"); + $this->assertNoLinkByHref("admin/config/search/pages/manage/$id/disable"); } if ($enable) { - $this->assertLinkByHref("admin/config/search/settings/manage/$id/enable"); + $this->assertLinkByHref("admin/config/search/pages/manage/$id/enable"); } else { - $this->assertNoLinkByHref("admin/config/search/settings/manage/$id/enable"); + $this->assertNoLinkByHref("admin/config/search/pages/manage/$id/enable"); } } diff --git a/core/modules/search/lib/Drupal/search/Tests/SearchMultilingualEntityTest.php b/core/modules/search/lib/Drupal/search/Tests/SearchMultilingualEntityTest.php index 7a54b5860357afba5bf2b44ec0202a030134ce61..37e00e8e2582ea8376f22d9dc3b0d15b2058b86e 100644 --- a/core/modules/search/lib/Drupal/search/Tests/SearchMultilingualEntityTest.php +++ b/core/modules/search/lib/Drupal/search/Tests/SearchMultilingualEntityTest.php @@ -127,7 +127,7 @@ function testMultilingualSearch() { // Now index the rest of the nodes. // Make sure index throttle is high enough, via the UI. - $this->drupalPostForm('admin/config/search/settings', array('cron_limit' => 20), t('Save configuration')); + $this->drupalPostForm('admin/config/search/pages', array('cron_limit' => 20), t('Save configuration')); $this->assertEqual(20, \Drupal::config('search.settings')->get('index.cron_limit', 100), 'Config setting was saved correctly'); $this->plugin->updateIndex(); diff --git a/core/modules/search/lib/Drupal/search/Tests/SearchRankingTest.php b/core/modules/search/lib/Drupal/search/Tests/SearchRankingTest.php index 5d16f801953e13ba7920ee0b5e3e6e7485399610..48410d66f276cd920f8934c52c790cf8a1b856d6 100644 --- a/core/modules/search/lib/Drupal/search/Tests/SearchRankingTest.php +++ b/core/modules/search/lib/Drupal/search/Tests/SearchRankingTest.php @@ -108,7 +108,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. @@ -121,8 +121,8 @@ public function testRankings() { foreach ($node_ranks as $node_rank) { // Enable the ranking we are testing. $edit['rankings_' . $node_rank] = 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 . '"]//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. @@ -137,8 +137,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 . '"]//option[@value="0"]'), 'Select list to prioritize ' . $node_rank . ' for node ranks is visible and set to 0.'); } diff --git a/core/modules/search/search.menu_links.yml b/core/modules/search/search.menu_links.yml index 4648596a71e427b2fe4ae690efffe0eaea5b985f..da872a96f439982aeba1222fe2fe0ba5cd1c0f71 100644 --- a/core/modules/search/search.menu_links.yml +++ b/core/modules/search/search.menu_links.yml @@ -3,8 +3,8 @@ search.view: route_name: search.view hidden: 1 search.settings: - title: 'Search settings' + title: 'Search pages' parent: system.admin_config_search - description: 'Configure relevance settings for search and other indexing options.' + description: 'Configure search pages and search indexing options.' route_name: search.settings weight: -10 diff --git a/core/modules/search/search.module b/core/modules/search/search.module index e6ea9f0d2cca83b5456ff8331a14446fda043d12..10d541e67979fd4f10871e2465e87ea214037b7d 100644 --- a/core/modules/search/search.module +++ b/core/modules/search/search.module @@ -76,18 +76,18 @@ function search_help($path, $arg) { $output .= '
' . t('Searching content and users') . '
'; $output .= '
' . t('Users with Use search permission can use the search block and Search page. Users with the View published content permission can search for content containing exact keywords. Users with the View user profiles permission can search for users containing the keyword anywhere in the user name, and users with the Administer users permission can search for users by email address. Additionally, users with Use advanced search permission can find content using more complex search methods and filtering by choosing the Advanced search option on the Search page.', array('@search' => url('search'))) . '
'; $output .= '
' . t('Indexing content with cron') . '
'; - $output .= '
' . t('To provide keyword searching, the search engine maintains an index of words found in the content and its fields, along with text added to your content by other modules (such as comments from the core Comment module, and taxonomy terms from the core Taxonomy module). To build and maintain this index, a correctly configured cron maintenance task is required. Users with Administer search permission can further configure the cron settings on the Search settings page.', array('@cron' => 'http://drupal.org/cron', '@searchsettings' => url('admin/config/search/settings'))) . '
'; + $output .= '
' . t('To provide keyword searching, the search engine maintains an index of words found in the content and its fields, along with text added to your content by other modules (such as comments from the core Comment module, and taxonomy terms from the core Taxonomy module). To build and maintain this index, a correctly configured cron maintenance task is required. Users with Administer search permission can further configure the cron settings on the Search settings page.', array('@cron' => 'http://drupal.org/cron', '@searchsettings' => url('admin/config/search/pages'))) . '
'; $output .= '
' . t('Content reindexing') . '
'; - $output .= '
' . t('Content-related actions on your site (creating, editing, or deleting content and comments) automatically cause affected content items to be marked for indexing or reindexing at the next cron run. When content is marked for reindexing, the previous content remains in the index until cron runs, at which time it is replaced by the new content. Unlike content-related actions, actions related to the structure of your site do not cause affected content to be marked for reindexing. Examples of structure-related actions that affect content include deleting or editing taxonomy terms, enabling or disabling modules that add text to content (such as Taxonomy, Comment, and field-providing modules), and modifying the fields or display parameters of your content types. If you take one of these actions and you want to ensure that the search index is updated to reflect your changed site structure, you can mark all content for reindexing by clicking the "Re-index site" button on the Search settings page. If you have a lot of content on your site, it may take several cron runs for the content to be reindexed.', array('@searchsettings' => url('admin/config/search/settings'))) . '
'; + $output .= '
' . t('Content-related actions on your site (creating, editing, or deleting content and comments) automatically cause affected content items to be marked for indexing or reindexing at the next cron run. When content is marked for reindexing, the previous content remains in the index until cron runs, at which time it is replaced by the new content. Unlike content-related actions, actions related to the structure of your site do not cause affected content to be marked for reindexing. Examples of structure-related actions that affect content include deleting or editing taxonomy terms, enabling or disabling modules that add text to content (such as Taxonomy, Comment, and field-providing modules), and modifying the fields or display parameters of your content types. If you take one of these actions and you want to ensure that the search index is updated to reflect your changed site structure, you can mark all content for reindexing by clicking the "Re-index site" button on the Search settings page. If you have a lot of content on your site, it may take several cron runs for the content to be reindexed.', array('@searchsettings' => url('admin/config/search/pages'))) . '
'; $output .= '
' . t('Configuring search settings') . '
'; - $output .= '
' . t('Indexing behavior can be adjusted using the Search settings page. Users with Administer search permission can control settings such as the Number of items to index per cron run, Indexing settings (word length), Active search plugins, and Content ranking, which lets you adjust the priority in which indexed content is returned in results.', array('@searchsettings' => url('admin/config/search/settings'))) . '
'; + $output .= '
' . t('Indexing behavior can be adjusted using the Search settings page. Users with Administer search permission can control settings such as the Number of items to index per cron run, Indexing settings (word length), Active search plugins, and Content ranking, which lets you adjust the priority in which indexed content is returned in results.', array('@searchsettings' => url('admin/config/search/pages'))) . '
'; $output .= '
' . t('Search block') . '
'; $output .= '
' . t('The Search module includes a default Search form block, which can be enabled and configured on the Blocks administration page. The block is available to users with the Search content permission.', array('@blocks' => url('admin/structure/block'))) . '
'; $output .= '
' . t('Extending Search module') . '
'; $output .= '
' . t('By default, the Search module only supports exact keyword matching in content searches. You can modify this behavior by installing a language-specific stemming module for your language (such as Porter Stemmer for American English), which allows words such as walk, walking, and walked to be matched in the Search module. Another approach is to use a third-party search technology with stemming or partial word matching features built in, such as Apache Solr or Sphinx. These and other search-related contributed modules can be downloaded by visiting Drupal.org.', array('@contrib-search' => 'http://drupal.org/project/modules?filters=tid%3A105', '@porterstemmer_url' => 'http://drupal.org/project/porterstemmer', '@solr_url' => 'http://drupal.org/project/apachesolr', '@sphinx_url' => 'http://drupal.org/project/sphinx')) . '
'; $output .= ''; return $output; - case 'admin/config/search/settings': + case 'admin/config/search/pages': return '

' . t('The search engine maintains an index of words found in your site\'s content. To build and maintain this index, a correctly configured cron maintenance task is required. Indexing behavior can be adjusted using the settings below.', array('@cron' => url('admin/reports/status'))) . '

'; case 'search#noresults': return t('