diff --git a/core/includes/form.inc b/core/includes/form.inc
index 49ace44..454b140 100644
--- a/core/includes/form.inc
+++ b/core/includes/form.inc
@@ -557,7 +557,6 @@ function form_state_keys_no_cache() {
     'must_validate',
     'rebuild',
     'rebuild_info',
-    'redirect',
     'no_redirect',
     'temporary',
     // Internal properties defined by form processing.
diff --git a/core/modules/language/lib/Drupal/language/Tests/LanguageConfigurationTest.php b/core/modules/language/lib/Drupal/language/Tests/LanguageConfigurationTest.php
index 94032ef..925cdae 100644
--- a/core/modules/language/lib/Drupal/language/Tests/LanguageConfigurationTest.php
+++ b/core/modules/language/lib/Drupal/language/Tests/LanguageConfigurationTest.php
@@ -49,7 +49,7 @@ function testLanguageConfiguration() {
     );
     $this->drupalPost('admin/config/regional/language/add', $edit, 'Add language');
     $this->assertText('French');
-    $this->assertEqual($this->getUrl(), url('admin/config/regional/language', array('absolute' => TRUE)), 'Correct page redirection.');
+    $this->assertUrl('admin/config/regional/language');
 
     // Check if the Default English language has no path prefix.
     $this->drupalGet('admin/config/regional/language/detection/url');
@@ -67,14 +67,13 @@ function testLanguageConfiguration() {
     );
     $this->drupalPost(NULL, $edit, t('Save configuration'));
     $this->assertNoFieldChecked('edit-site-default-en', 'Default language updated.');
-    $this->assertEqual($this->getUrl(), url('admin/config/regional/language', array('absolute' => TRUE)), 'Correct page redirection.');
+    $this->assertUrl('admin/config/regional/language');
 
     // Check if a valid language prefix is added afrer changing the default
     // language.
     $this->drupalGet('admin/config/regional/language/detection/url');
     $this->assertFieldByXPath('//input[@name="prefix[en]"]', 'en', 'A valid path prefix has been added to the previous default language.');
     // Check if French still has a path prefix.
-    $this->drupalGet('admin/config/regional/language/detection/url');
     $this->assertFieldByXPath('//input[@name="prefix[fr]"]', 'fr', 'French still has a path prefix.');
 
     // Check that prefix can be changed.
@@ -82,6 +81,7 @@ function testLanguageConfiguration() {
       'prefix[fr]' => 'french',
     );
     $this->drupalPost(NULL, $edit, t('Save configuration'));
+    $this->drupalGet('admin/config/regional/language/detection/url');
     $this->assertFieldByXPath('//input[@name="prefix[fr]"]', 'french', 'French path prefix has changed.');
 
     // Check that prefix of non default language cannot be changed to
diff --git a/core/modules/search/lib/Drupal/search/Tests/SearchBlockTest.php b/core/modules/search/lib/Drupal/search/Tests/SearchBlockTest.php
index 0ab941e..6c4da79 100644
--- a/core/modules/search/lib/Drupal/search/Tests/SearchBlockTest.php
+++ b/core/modules/search/lib/Drupal/search/Tests/SearchBlockTest.php
@@ -72,22 +72,12 @@ function testBlock() {
     $this->assertText('Your search yielded no results');
 
     // Confirm that the user is redirected to the search page.
-    $this->assertEqual(
-      $this->getUrl(),
-      url('search/node/' . $terms['search_block_form'], array('absolute' => TRUE)),
-      'Redirected to correct url.'
-    );
+    $this->assertUrl('search/node/' . $terms['search_block_form']);
 
     // Test an empty search via the block form, from the front page.
     $terms = array('search_block_form' => '');
     $this->drupalPost('node', $terms, t('Search'));
     $this->assertText('Please enter some keywords');
-
-    // Confirm that the user is redirected to the search page, when form is submitted empty.
-    $this->assertEqual(
-      $this->getUrl(),
-      url('search/node/', array('absolute' => TRUE)),
-      'Redirected to correct url.'
-    );
+    $this->assertUrl('node');
   }
 }
diff --git a/core/modules/search/search.module b/core/modules/search/search.module
index 315ae7a..a90012e 100644
--- a/core/modules/search/search.module
+++ b/core/modules/search/search.module
@@ -1020,10 +1020,24 @@ function search_form($form, &$form_state, $action = '', $keys = '', $module = NU
  * @see search_box_form_submit()
  */
 function search_box($form, &$form_state, $form_id) {
+  // #action cannot be used for the search block form, as it is not guaranteed
+  // that the search block is enabled on the target path. Therefore, we have to
+  // submit to the same page.
+  // @see http://drupal.org/node/292565
+  $info = search_get_default_module_info();
+  if ($info) {
+    $form_state['redirect'] = 'search/' . $info['path'];
+  }
+  // Do not output the form if there is no active search implementation.
+  else {
+    $form['#access'] = FALSE;
+  }
   $form[$form_id] = array(
     '#type' => 'search',
     '#title' => t('Search'),
     '#title_display' => 'invisible',
+    '#required' => TRUE,
+    '#required_error' => t('Please enter some keywords.'),
     '#size' => 15,
     '#default_value' => '',
     '#attributes' => array('title' => t('Enter the terms you wish to search for.')),
@@ -1039,31 +1053,16 @@ function search_box($form, &$form_state, $form_id) {
  * Process a block search form submission.
  */
 function search_box_form_submit($form, &$form_state) {
-  // The search form relies on control of the redirect destination for its
-  // functionality, so we override any static destination set in the request.
-  // See http://drupal.org/node/292565.
+  // A destination query parameter on the current/originating path/page would
+  // cause drupal_redirect_form() to redirect to that destination path instead
+  // of the search page. Unset it to ensure we redirect to the search page.
+  // @see http://drupal.org/node/292565
   if (isset($_GET['destination'])) {
     unset($_GET['destination']);
   }
-
-  // Check to see if the form was submitted empty.
-  // If it is empty, display an error message.
-  // (This method is used instead of setting #required to TRUE for this field
-  // because that results in a confusing error message.  It would say a plain
-  // "field is required" because the search keywords field has no title.
-  // The error message would also complain about a missing #title field.)
-  if ($form_state['values']['search_block_form'] == '') {
-    form_set_error('keys', t('Please enter some keywords.'));
-  }
-
+  // Append the search keywords to the redirect path.
   $form_id = $form['form_id']['#value'];
-  $info = search_get_default_module_info();
-  if ($info) {
-    $form_state['redirect'] = 'search/' . $info['path'] . '/' . trim($form_state['values'][$form_id]);
-  }
-  else {
-    form_set_error(NULL, t('Search is currently disabled.'), 'error');
-  }
+  $form_state['redirect'] .= '/' . trim($form_state['values'][$form_id]);
 }
 
 /**
