diff --git a/core/lib/Drupal/Core/Menu/LocalTaskManager.php b/core/lib/Drupal/Core/Menu/LocalTaskManager.php index 4229302..997c6db 100644 --- a/core/lib/Drupal/Core/Menu/LocalTaskManager.php +++ b/core/lib/Drupal/Core/Menu/LocalTaskManager.php @@ -149,7 +149,6 @@ public function __construct(ControllerResolverInterface $controller_resolver, Re $this->moduleHandler = $module_handler; $this->alterInfo('local_tasks'); $this->setCacheBackend($cache, 'local_task_plugins:' . $language_manager->getCurrentLanguage()->getId(), array('local_task')); - $this->setCacheBackend(new NullBackend('foo'), 'local_task_plugins:' . $language_manager->getCurrentLanguage()->getId(), array('local_task')); } /** @@ -196,7 +195,7 @@ public function getDefinitions() { public function getLocalTasksForRoute($route_name) { if (!isset($this->instances[$route_name])) { $this->instances[$route_name] = array(); - if (FALSE && $cache = $this->cacheBackend->get($this->cacheKey . ':' . $route_name)) { + if ($cache = $this->cacheBackend->get($this->cacheKey . ':' . $route_name)) { $base_routes = $cache->data['base_routes']; $parents = $cache->data['parents']; $children = $cache->data['children']; diff --git a/core/modules/field_ui/src/Form/FieldStorageAddForm.php b/core/modules/field_ui/src/Form/FieldStorageAddForm.php index 1e1fcc9..4fc50e0 100644 --- a/core/modules/field_ui/src/Form/FieldStorageAddForm.php +++ b/core/modules/field_ui/src/Form/FieldStorageAddForm.php @@ -320,6 +320,8 @@ public function submitForm(array &$form, FormStateInterface $form_state) { $error = FALSE; $values = $form_state->getValues(); $destinations = array(); + $entity_type = $this->entityManager->getDefinition($this->entityTypeId); + $bundle_entity_type = FieldUI::getRouteBundleEntityType($entity_type); // Create new field. if ($values['new_storage_type']) { @@ -352,7 +354,7 @@ public function submitForm(array &$form, FormStateInterface $form_state) { ); $destinations[] = array('route_name' => "entity.field_config.{$this->entityTypeId}_storage_edit_form", 'route_parameters' => $route_parameters); $destinations[] = array('route_name' => "entity.field_config.{$this->entityTypeId}_field_edit_form", 'route_parameters' => $route_parameters); - $destinations[] = array('route_name' => "entity.{$this->bundleEntityTypeId}.field_ui_fields", 'route_parameters' => $route_parameters); + $destinations[] = array('route_name' => "entity.{$bundle_entity_type}.field_ui_fields", 'route_parameters' => $route_parameters); // Store new field information for any additional submit handlers. $form_state->set(['fields_added', '_add_new_field'], $values['field_name']); @@ -383,7 +385,7 @@ public function submitForm(array &$form, FormStateInterface $form_state) { 'field_config' => $field->id(), ); $destinations[] = array('route_name' => "entity.field_config.{$this->entityTypeId}_field_edit_form", 'route_parameters' => $route_parameters); - $destinations[] = array('route_name' => "entity.{$this->bundleEntityTypeId}.field_ui_fields", 'route_parameters' => $route_parameters); + $destinations[] = array('route_name' => "entity.{$bundle_entity_type}.field_ui_fields", 'route_parameters' => $route_parameters); // Store new field information for any additional submit handlers. $form_state->set(['fields_added', '_add_existing_field'], $field_name);