diff --git a/core/modules/comment/comment.local_tasks.yml b/core/modules/comment/comment.local_tasks.yml index 1c0c901..3119823 100644 --- a/core/modules/comment/comment.local_tasks.yml +++ b/core/modules/comment/comment.local_tasks.yml @@ -1,14 +1,14 @@ comment.permalink_tab: - route_name: comment_permalink + route_name: comment.permalink title: 'View comment' tab_root_id: comment.permalink_tab comment.edit_page_tab: - route_name: comment_edit_page + route_name: comment.edit_page title: 'Edit' tab_root_id: comment.permalink_tab weight: 0 comment.confirm_delete_tab: - route_name: comment_confirm_delete + route_name: comment.confirm_delete title: 'Delete' tab_root_id: comment.permalink_tab weight: 10 diff --git a/core/modules/content_translation/lib/Drupal/content_translation/Access/ContentTranslationManageAccessCheck.php b/core/modules/content_translation/lib/Drupal/content_translation/Access/ContentTranslationManageAccessCheck.php index 3a53710..8cafd5b 100644 --- a/core/modules/content_translation/lib/Drupal/content_translation/Access/ContentTranslationManageAccessCheck.php +++ b/core/modules/content_translation/lib/Drupal/content_translation/Access/ContentTranslationManageAccessCheck.php @@ -46,7 +46,10 @@ public function appliesTo() { * {@inheritdoc} */ public function access(Route $route, Request $request) { - if ($entity = $request->attributes->get('entity')) { + if (($entity_type = $request->attributes->get('entity_type')) && $request->attributes->has($entity_type)) { + // Get the entity based on the returned type. + $entity = $request->attributes->get($entity_type); + $route_requirements = $route->getRequirements(); $operation = $route_requirements['_access_content_translation_manage']; $entity_type = $entity->entityType(); diff --git a/core/modules/content_translation/lib/Drupal/content_translation/Access/ContentTranslationOverviewAccess.php b/core/modules/content_translation/lib/Drupal/content_translation/Access/ContentTranslationOverviewAccess.php index 116e9c5..4d6e839 100644 --- a/core/modules/content_translation/lib/Drupal/content_translation/Access/ContentTranslationOverviewAccess.php +++ b/core/modules/content_translation/lib/Drupal/content_translation/Access/ContentTranslationOverviewAccess.php @@ -45,9 +45,9 @@ public function appliesTo() { * {@inheritdoc} */ public function access(Route $route, Request $request) { - if ($entity = $request->attributes->get('entity')) { - // Get entity base info. - $entity_type = $entity->entityType(); + if (($entity_type = $request->attributes->get('entity_type')) && $request->attributes->has($entity_type)) { + // Get the entity based on the returned type. + $entity = $request->attributes->get($entity_type); $bundle = $entity->bundle(); // Get account details from request. diff --git a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Routing/RouteSubscriber.php b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Routing/RouteSubscriber.php index fea1a60..bb8a8e0 100644 --- a/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Routing/RouteSubscriber.php +++ b/core/modules/system/tests/modules/entity_test/lib/Drupal/entity_test/Routing/RouteSubscriber.php @@ -42,7 +42,7 @@ public function routes(RouteBuildEvent $event) { $collection->add("entity_test.add_$entity_type", $route); $route = new Route( - "$entity_type/manage/{$entity_type}", + "$entity_type/manage/{{$entity_type}}", array('_content' => '\Drupal\entity_test\Controller\EntityTestController::testEdit', 'entity_type' => $entity_type), array('_permission' => 'administer entity_test content') );