diff --git a/core/modules/views_ui/src/ViewListBuilder.php b/core/modules/views_ui/src/ViewListBuilder.php index 0a5ef2439bc..1595cf945bc 100644 --- a/core/modules/views_ui/src/ViewListBuilder.php +++ b/core/modules/views_ui/src/ViewListBuilder.php @@ -161,6 +161,8 @@ class ViewListBuilder extends ConfigEntityListBuilder { */ public function getDefaultOperations(EntityInterface $entity) { $operations = parent::getDefaultOperations($entity); + // Remove destination redirect for Edit operation. + $operations['edit']['url'] = $entity->toUrl('edit-form'); if ($entity->hasLinkTemplate('duplicate-form')) { $operations['duplicate'] = [ diff --git a/core/modules/views_ui/tests/src/Functional/ViewsListTest.php b/core/modules/views_ui/tests/src/Functional/ViewsListTest.php index 80ac1b8d003..5557e12d7c8 100644 --- a/core/modules/views_ui/tests/src/Functional/ViewsListTest.php +++ b/core/modules/views_ui/tests/src/Functional/ViewsListTest.php @@ -52,6 +52,13 @@ class ViewsListTest extends UITestBase { $this->assertResponse(200); $this->assertLink(t('Add view')); + // Check that there is a link to the content view without a destination + // parameter. + $this->drupalGet('admin/structure/views'); + $links = $this->getSession()->getPage()->findAll('xpath', "//a[contains(@href, 'admin/structure/views/view/content')]"); + $this->assertStringEndsWith('admin/structure/views/view/content', $links[0]->getAttribute('href')); + $this->assertLinkByHref('admin/structure/views/view/content/delete?destination'); + // Count default views to be subtracted from the limit. $views = count(Views::getEnabledViews());