diff --git a/core/modules/views_ui/src/Tests/RedirectTest.php b/core/modules/views_ui/src/Tests/RedirectTest.php index 30d387c..519ec79 100644 --- a/core/modules/views_ui/src/Tests/RedirectTest.php +++ b/core/modules/views_ui/src/Tests/RedirectTest.php @@ -27,17 +27,17 @@ class RedirectTest extends UITestBase { public function testRedirect() { $view_name = 'test_view'; - $random_destination = $this->randomMachineName(); + $random_destination = 'node'; $edit_path = "admin/structure/views/view/$view_name/edit"; - $this->drupalPostForm($edit_path, array(), t('Save') , array('query' => array('destination' => $random_destination))); - $this->assertUrl($random_destination, array(), 'Make sure the user got redirected to the expected page defined in the destination.'); + $this->drupalPostForm($edit_path, array(), t('Save') , array('query' => array('destination' => 'node'))); + $this->assertUrl('node', array(), 'Make sure the user got redirected to the expected page defined in the destination.'); // Setup a view with a certain page display path. If you change the path // but have the old url in the destination the user should be redirected to // the new path. $view_name = 'test_redirect_view'; - $new_path = $this->randomMachineName(); + $new_path = 'user'; $edit_path = "admin/structure/views/view/$view_name/edit"; $path_edit_path = "admin/structure/views/nojs/display/$view_name/page_1/path"; diff --git a/core/modules/views_ui/src/ViewEditForm.php b/core/modules/views_ui/src/ViewEditForm.php index d236756..a0f7ca6 100644 --- a/core/modules/views_ui/src/ViewEditForm.php +++ b/core/modules/views_ui/src/ViewEditForm.php @@ -20,6 +20,7 @@ use Drupal\Core\Url; use Drupal\user\TempStoreFactory; use Drupal\views\Views; +use Symfony\Component\HttpFoundation\Request; use Symfony\Component\HttpFoundation\RequestStack; use Symfony\Component\DependencyInjection\ContainerInterface;