diff --git a/core/modules/views_ui/lib/Drupal/views_ui/Form/Ajax/ViewsFormBase.php b/core/modules/views_ui/lib/Drupal/views_ui/Form/Ajax/ViewsFormBase.php
index f3aa6ee..cfb0a8b 100644
--- a/core/modules/views_ui/lib/Drupal/views_ui/Form/Ajax/ViewsFormBase.php
+++ b/core/modules/views_ui/lib/Drupal/views_ui/Form/Ajax/ViewsFormBase.php
@@ -149,7 +149,7 @@ public function getForm(ViewStorageInterface $view, $display_id, $js) {
       if (!$form_state['ajax']) {
         return new RedirectResponse(url($form_path, array('absolute' => TRUE)));
       }
-      $form_state['path'] = url($form_path);
+      $form_state['path'] = $form_path;
       $response = views_ajax_form_wrapper($form_state['form_id'], $form_state);
     }
     elseif (!$form_state['ajax']) {
diff --git a/core/modules/views_ui/lib/Drupal/views_ui/Tests/RowUITest.php b/core/modules/views_ui/lib/Drupal/views_ui/Tests/RowUITest.php
index 0414933..2832bad 100644
--- a/core/modules/views_ui/lib/Drupal/views_ui/Tests/RowUITest.php
+++ b/core/modules/views_ui/lib/Drupal/views_ui/Tests/RowUITest.php
@@ -63,6 +63,12 @@ public function testRowUI() {
     $row = $view->display_handler->getOption('row');
     $this->assertEqual($row['type'], 'test_row', 'Make sure that the test_row got saved as used row plugin.');
     $this->assertEqual($row['options']['test_option'], $random_name, 'Make sure that the custom settings field got saved as expected.');
+
+    // Change the row plugin to fields using ajax.
+    $this->drupalPostAjaxForm($row_plugin_url, array('row' => 'fields'), array('op' => 'Apply'), str_replace('/nojs/', '/ajax/', $row_plugin_url));
+    $this->drupalPostAjaxForm(NULL, array(), array('op' => 'Apply'));
+    $this->assertResponse(200);
+    $this->assertFieldByName('row', 'fields', 'Make sure that the fields got saved as used row plugin.');
   }
 
 }
