diff --git a/core/modules/config_translation/config_translation.module b/core/modules/config_translation/config_translation.module index e6f463b..eed1f03 100644 --- a/core/modules/config_translation/config_translation.module +++ b/core/modules/config_translation/config_translation.module @@ -123,7 +123,7 @@ function config_translation_config_translation_info(&$info) { // Make sure entity type is fieldable and has a base route. if ($entity_type->isFieldable() && !empty($base_route)) { $info[$entity_type_id . '_fields'] = array( - 'base_route_name' => 'field_ui.field_edit_' . $entity_type_id, + 'base_route_name' => "entity.field_config.field_ui.field_{$entity_type_id}_edit_form", 'entity_type' => 'field_config', 'title' => '!label field', 'class' => '\Drupal\config_translation\ConfigFieldMapper', @@ -169,12 +169,12 @@ function config_translation_entity_operation(EntityInterface $entity) { $operations = array(); $entity_type = $entity->getEntityType(); if ($entity_type->isSubclassOf('Drupal\Core\Config\Entity\ConfigEntityInterface') && - $entity->hasLinkTemplate('drupal:config-translation-overview') && + $entity->hasLinkTemplate('config-translation-overview') && \Drupal::currentUser()->hasPermission('translate configuration')) { $operations['translate'] = array( 'title' => t('Translate'), 'weight' => 50, - ) + $entity->urlInfo('drupal:config-translation-overview')->toArray(); + ) + $entity->urlInfo('config-translation-overview')->toArray(); } return $operations; diff --git a/core/modules/field_ui/src/FieldUI.php b/core/modules/field_ui/src/FieldUI.php index e3f557e..33003bf 100644 --- a/core/modules/field_ui/src/FieldUI.php +++ b/core/modules/field_ui/src/FieldUI.php @@ -29,7 +29,8 @@ class FieldUI { public static function getOverviewRouteInfo($entity_type_id, $bundle) { $entity_type = \Drupal::entityManager()->getDefinition($entity_type_id); if ($entity_type->get('field_ui_base_route')) { - return new Url("entity.{$entity_type->getBundleEntityType()}.field_ui_fields", array( + $bundle_entity_type = $entity_type->getBundleEntityType() != 'bundle'? $entity_type->getBundleEntityType() : $entity_type->id(); + return new Url("entity.{$bundle_entity_type}.field_ui_fields", array( $entity_type->getBundleEntityType() => $bundle, )); } diff --git a/core/modules/field_ui/src/Plugin/Derivative/FieldUiLocalTask.php b/core/modules/field_ui/src/Plugin/Derivative/FieldUiLocalTask.php index e31ac77..aac7bdc 100644 --- a/core/modules/field_ui/src/Plugin/Derivative/FieldUiLocalTask.php +++ b/core/modules/field_ui/src/Plugin/Derivative/FieldUiLocalTask.php @@ -71,9 +71,7 @@ public function getDerivativeDefinitions($base_plugin_definition) { foreach ($this->entityManager->getDefinitions() as $entity_type_id => $entity_type) { if ($entity_type->isFieldable() && $entity_type->get('field_ui_base_route')) { $field_entity_type = $entity_type->getBundleEntityType() ?: $entity_type_id; - if ($field_entity_type == 'bundle') { - $field_entity_type = $entity_type_id; - } + $field_entity_type = $entity_type->getBundleEntityType() != 'bundle'? $entity_type->getBundleEntityType() : $entity_type_id; $this->derivatives["overview_$field_entity_type"] = array( 'route_name' => "entity.$field_entity_type.field_ui_fields",