diff --git a/core/modules/views_ui/src/ViewListBuilder.php b/core/modules/views_ui/src/ViewListBuilder.php index 0a5ef2439bc807e8e1f79c77dd5a9df80a619815..1595cf945bc1875f2112f7748748b9f4dfd06ede 100644 --- a/core/modules/views_ui/src/ViewListBuilder.php +++ b/core/modules/views_ui/src/ViewListBuilder.php @@ -161,6 +161,8 @@ public function buildHeader() { */ 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 80ac1b8d00398c8ad903f6861272dccca701bf06..5557e12d7c86e76281759567747eb94b0f0f3257 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 @@ public function testViewsListLimit() { $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());