diff --git a/core/modules/content_translation/src/Routing/ContentTranslationRouteSubscriber.php b/core/modules/content_translation/src/Routing/ContentTranslationRouteSubscriber.php index 91d4314..29a748d 100644 --- a/core/modules/content_translation/src/Routing/ContentTranslationRouteSubscriber.php +++ b/core/modules/content_translation/src/Routing/ContentTranslationRouteSubscriber.php @@ -53,6 +53,11 @@ protected function alterRoutes(RouteCollection $collection) { $base_path = $entity_route->getPath(); } + // Some canonical routes have '/edit' in their path, let's skip that. + if (substr($base_path, -5) === '/edit') { + $base_path = substr($base_path, 0, -5); + } + // Inherit admin route status from edit route, if exists. $is_admin = FALSE; $route_name = "entity.$entity_type_id.edit_form"; diff --git a/core/modules/shortcut/src/Tests/ShortcutLinksTest.php b/core/modules/shortcut/src/Tests/ShortcutLinksTest.php index 84f315b..bc31652 100644 --- a/core/modules/shortcut/src/Tests/ShortcutLinksTest.php +++ b/core/modules/shortcut/src/Tests/ShortcutLinksTest.php @@ -194,7 +194,7 @@ public function testShortcutLinkRename() { $shortcuts = $set->getShortcuts(); $shortcut = reset($shortcuts); - $this->drupalPostForm('admin/config/user-interface/shortcut/link/' . $shortcut->id(), array('title[0][value]' => $new_link_name), t('Save')); + $this->drupalPostForm('admin/config/user-interface/shortcut/link/' . $shortcut->id() . '/edit', array('title[0][value]' => $new_link_name), t('Save')); $saved_set = ShortcutSet::load($set->id()); $titles = $this->getShortcutInformation($saved_set, 'title'); $this->assertTrue(in_array($new_link_name, $titles), 'Shortcut renamed: ' . $new_link_name); @@ -213,7 +213,7 @@ public function testShortcutLinkChangePath() { $shortcuts = $set->getShortcuts(); $shortcut = reset($shortcuts); - $this->drupalPostForm('admin/config/user-interface/shortcut/link/' . $shortcut->id(), array('title[0][value]' => $shortcut->getTitle(), 'link[0][uri]' => $new_link_path), t('Save')); + $this->drupalPostForm('admin/config/user-interface/shortcut/link/' . $shortcut->id() . '/edit', array('title[0][value]' => $shortcut->getTitle(), 'link[0][uri]' => $new_link_path), t('Save')); $saved_set = ShortcutSet::load($set->id()); $paths = $this->getShortcutInformation($saved_set, 'link'); $this->assertTrue(in_array('internal:' . $new_link_path, $paths), 'Shortcut path changed: ' . $new_link_path); diff --git a/core/modules/system/src/Tests/Entity/EntityFormTest.php b/core/modules/system/src/Tests/Entity/EntityFormTest.php index 3953bba..34237ae 100644 --- a/core/modules/system/src/Tests/Entity/EntityFormTest.php +++ b/core/modules/system/src/Tests/Entity/EntityFormTest.php @@ -84,14 +84,14 @@ protected function doTestFormCRUD($entity_type) { $this->assertTrue($entity, format_string('%entity_type: Entity found in the database.', array('%entity_type' => $entity_type))); $edit['name[0][value]'] = $name2; - $this->drupalPostForm($entity_type . '/manage/' . $entity->id(), $edit, t('Save')); + $this->drupalPostForm($entity_type . '/manage/' . $entity->id() . '/edit', $edit, t('Save')); $entity = $this->loadEntityByName($entity_type, $name1); $this->assertFalse($entity, format_string('%entity_type: The entity has been modified.', array('%entity_type' => $entity_type))); $entity = $this->loadEntityByName($entity_type, $name2); $this->assertTrue($entity, format_string('%entity_type: Modified entity found in the database.', array('%entity_type' => $entity_type))); $this->assertNotEqual($entity->name->value, $name1, format_string('%entity_type: The entity name has been modified.', array('%entity_type' => $entity_type))); - $this->drupalGet($entity_type . '/manage/' . $entity->id()); + $this->drupalGet($entity_type . '/manage/' . $entity->id() . '/edit'); $this->clickLink(t('Delete')); $this->drupalPostForm(NULL, array(), t('Delete')); $entity = $this->loadEntityByName($entity_type, $name2); diff --git a/core/modules/system/src/Tests/Menu/BreadcrumbTest.php b/core/modules/system/src/Tests/Menu/BreadcrumbTest.php index 804be3b..6548208 100644 --- a/core/modules/system/src/Tests/Menu/BreadcrumbTest.php +++ b/core/modules/system/src/Tests/Menu/BreadcrumbTest.php @@ -79,9 +79,9 @@ function testBreadCrumbs() { $trail += array( 'admin/structure/taxonomy' => t('Taxonomy'), ); - $this->assertBreadcrumb('admin/structure/taxonomy/manage/tags/edit', $trail); + $this->assertBreadcrumb('admin/structure/taxonomy/manage/tags', $trail); $trail += array( - 'admin/structure/taxonomy/manage/tags/edit' => t('Tags'), + 'admin/structure/taxonomy/manage/tags' => t('Tags'), ); $this->assertBreadcrumb('admin/structure/taxonomy/manage/tags/overview', $trail); $this->assertBreadcrumb('admin/structure/taxonomy/manage/tags/add', $trail); diff --git a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTest.php b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTest.php index 53d6632..bfd5ad0 100644 --- a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTest.php +++ b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTest.php @@ -46,8 +46,8 @@ * "langcode" = "langcode", * }, * links = { - * "canonical" = "/entity_test/{entity_test}", - * "edit-form" = "/entity_test/manage/{entity_test}", + * "canonical" = "/entity_test/{entity_test}/edit", + * "edit-form" = "/entity_test/manage/{entity_test}/edit", * "delete-form" = "/entity_test/delete/entity_test/{entity_test}", * }, * field_ui_base_route = "entity.entity_test.admin_form", diff --git a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestBaseFieldDisplay.php b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestBaseFieldDisplay.php index 1f70d97..f241e76 100644 --- a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestBaseFieldDisplay.php +++ b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestBaseFieldDisplay.php @@ -34,9 +34,9 @@ * "bundle" = "type" * }, * links = { - * "canonical" = "/entity_test_base_field_display/{entity_test_base_field_display}", + * "canonical" = "/entity_test_base_field_display/{entity_test_base_field_display}/edit", * "edit-form" = "/entity_test_base_field_display/manage/{entity_test_base_field_display}", - * "delete-form" = "/entity_test/delete/entity_test_base_field_display/{entity_test_base_field_display}", + * "delete-form" = "/entity_test/delete/entity_test_base_field_display/{entity_test_base_field_display}/edit", * }, * field_ui_base_route = "entity.entity_test_base_field_display.admin_form", * ) diff --git a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMul.php b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMul.php index 7d94edb..0269c89 100644 --- a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMul.php +++ b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMul.php @@ -42,8 +42,8 @@ * "langcode" = "langcode", * }, * links = { - * "canonical" = "/entity_test_mul/manage/{entity_test_mul}", - * "edit-form" = "/entity_test_mul/manage/{entity_test_mul}", + * "canonical" = "/entity_test_mul/manage/{entity_test_mul}/edit", + * "edit-form" = "/entity_test_mul/manage/{entity_test_mul}/edit", * "delete-form" = "/entity_test/delete/entity_test_mul/{entity_test_mul}", * }, * field_ui_base_route = "entity.entity_test_mul.admin_form", diff --git a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulChanged.php b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulChanged.php index 3c7b581..ba57194 100644 --- a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulChanged.php +++ b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulChanged.php @@ -42,8 +42,8 @@ * "langcode" = "langcode" * }, * links = { - * "canonical" = "/entity_test_mul_changed/manage/{entity_test_mul_changed}", - * "edit-form" = "/entity_test_mul_changed/manage/{entity_test_mul_changed}", + * "canonical" = "/entity_test_mul_changed/manage/{entity_test_mul_changed}/edit", + * "edit-form" = "/entity_test_mul_changed/manage/{entity_test_mul_changed}/edit", * "delete-form" = "/entity_test/delete/entity_test_mul_changed/{entity_test_mul_changed}", * }, * field_ui_base_route = "entity.entity_test_mul_changed.admin_form", diff --git a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulLangcodeKey.php b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulLangcodeKey.php index 7b57b6b..042681a 100644 --- a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulLangcodeKey.php +++ b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulLangcodeKey.php @@ -41,8 +41,8 @@ * "default_langcode" = "custom_default_langcode_key", * }, * links = { - * "canonical" = "/entity_test_mul_langcode_key/manage/{entity_test_mul_langcode_key}", - * "edit-form" = "/entity_test_mul_langcode_key/manage/{entity_test_mul_langcode_key}", + * "canonical" = "/entity_test_mul_langcode_key/manage/{entity_test_mul_langcode_key}/edit", + * "edit-form" = "/entity_test_mul_langcode_key/manage/{entity_test_mul_langcode_key}/edit", * "delete-form" = "/entity_test/delete/entity_test_mul_langcode_key/{entity_test_mul_langcode_key}", * }, * field_ui_base_route = "entity.entity_test_mul_langcode_key.admin_form", diff --git a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulRev.php b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulRev.php index 8ff43e2..3df1a97 100644 --- a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulRev.php +++ b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulRev.php @@ -45,7 +45,7 @@ * "langcode" = "langcode", * }, * links = { - * "canonical" = "/entity_test_mulrev/manage/{entity_test_mulrev}", + * "canonical" = "/entity_test_mulrev/manage/{entity_test_mulrev}/edit", * "delete-form" = "/entity_test/delete/entity_test_mulrev/{entity_test_mulrev}", * "edit-form" = "/entity_test_mulrev/manage/{entity_test_mulrev}/edit", * "revision" = "/entity_test_mulrev/{entity_test_mulrev}/revision/{entity_test_mulrev_revision}/view", diff --git a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulRevChanged.php b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulRevChanged.php index e3c00d9..6551eeb 100644 --- a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulRevChanged.php +++ b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestMulRevChanged.php @@ -43,9 +43,9 @@ * "langcode" = "langcode", * }, * links = { - * "canonical" = "/entity_test_mulrev_changed/manage/{entity_test_mulrev_changed}", + * "canonical" = "/entity_test_mulrev_changed/manage/{entity_test_mulrev_changed}/edit", * "delete-form" = "/entity_test/delete/entity_test_mulrev_changed/{entity_test_mulrev_changed}", - * "edit-form" = "/entity_test_mulrev_changed/manage/{entity_test_mulrev_changed}", + * "edit-form" = "/entity_test_mulrev_changed/manage/{entity_test_mulrev_changed}/edit", * "revision" = "/entity_test_mulrev_changed/{entity_test_mulrev_changed}/revision/{entity_test_mulrev_changed_revision}/view", * } * ) diff --git a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestRev.php b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestRev.php index 7a53418..f048c61 100644 --- a/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestRev.php +++ b/core/modules/system/tests/modules/entity_test/src/Entity/EntityTestRev.php @@ -43,7 +43,7 @@ * "langcode" = "langcode", * }, * links = { - * "canonical" = "/entity_test_rev/manage/{entity_test_rev}", + * "canonical" = "/entity_test_rev/manage/{entity_test_rev}/edit", * "delete-form" = "/entity_test/delete/entity_test_rev/{entity_test_rev}", * "edit-form" = "/entity_test_rev/manage/{entity_test_rev}/edit", * "revision" = "/entity_test_rev/{entity_test_rev}/revision/{entity_test_rev_revision}/view", diff --git a/core/modules/taxonomy/src/Entity/Vocabulary.php b/core/modules/taxonomy/src/Entity/Vocabulary.php index d0aed28..e391636 100644 --- a/core/modules/taxonomy/src/Entity/Vocabulary.php +++ b/core/modules/taxonomy/src/Entity/Vocabulary.php @@ -38,12 +38,11 @@ * "weight" = "weight" * }, * links = { - * "canonical" = "/admin/structure/taxonomy/manage/{taxonomy_vocabulary}/edit", * "add-form" = "/admin/structure/taxonomy/manage/{taxonomy_vocabulary}/add", - * "edit-form" = "/admin/structure/taxonomy/manage/{taxonomy_vocabulary}/edit", * "delete-form" = "/admin/structure/taxonomy/manage/{taxonomy_vocabulary}/delete", * "reset-form" = "/admin/structure/taxonomy/manage/{taxonomy_vocabulary}/reset", * "overview-form" = "/admin/structure/taxonomy/manage/{taxonomy_vocabulary}/overview", + * "edit-form" = "/admin/structure/taxonomy/manage/{taxonomy_vocabulary}", * "collection" = "/admin/structure/taxonomy", * }, * config_export = {