commit e74fe36cb15555d5c2045c6da28cd385374a20b8 Author: Hydraner Date: Mon Sep 23 12:27:42 2013 +0100 fix2 diff --git a/core/includes/entity.inc b/core/includes/entity.inc index cb4bfb7..7209bbc 100644 --- a/core/includes/entity.inc +++ b/core/includes/entity.inc @@ -757,11 +757,11 @@ function entity_get_render_display(EntityInterface $entity, $view_mode) { // the former if the latter does not exist is disabled. if ($view_mode != 'default') { $ids = array( - 'entity.display.' . $entity->entityType() . '.' . $entity->bundle() . '.default', - 'entity.display.' . $entity->entityType() . '.' . $entity->bundle() . '.' . $view_mode, + 'default' => 'entity.display.' . $entity->entityType() . '.' . $entity->bundle() . '.default', + $view_mode => 'entity.display.' . $entity->entityType() . '.' . $entity->bundle() . '.' . $view_mode, ); $entity_displays = \Drupal::service('config.storage')->readMultiple($ids); - if (isset($entity_displays[$ids[1]]) && $entity_displays[$ids[1]]->status()) { + if ($display = $entity_form_displays[$ids[$view_mode]] && $display['status']) { $render_view_mode = $view_mode; } } diff --git a/core/modules/entity/lib/Drupal/entity/Entity/EntityFormMode.php b/core/modules/entity/lib/Drupal/entity/Entity/EntityFormMode.php index 76d41d2..6a3cb8f 100644 --- a/core/modules/entity/lib/Drupal/entity/Entity/EntityFormMode.php +++ b/core/modules/entity/lib/Drupal/entity/Entity/EntityFormMode.php @@ -48,7 +48,6 @@ * "id" = "id", * "label" = "label", * "uuid" = "uuid", - * "status" = "status" * }, * links = { * "edit-form" = "admin/structure/display-modes/form/manage/{form_mode}" diff --git a/core/modules/entity/lib/Drupal/entity/Entity/EntityViewMode.php b/core/modules/entity/lib/Drupal/entity/Entity/EntityViewMode.php index 4c27ff9..bf74dd3 100644 --- a/core/modules/entity/lib/Drupal/entity/Entity/EntityViewMode.php +++ b/core/modules/entity/lib/Drupal/entity/Entity/EntityViewMode.php @@ -49,7 +49,6 @@ * "id" = "id", * "label" = "label", * "uuid" = "uuid", - * "status" = "status" * }, * links = { * "edit-form" = "admin/structure/display-modes/view/manage/{view_mode}" diff --git a/core/modules/field/field.install b/core/modules/field/field.install index 0f21a25..b41da49 100644 --- a/core/modules/field/field.install +++ b/core/modules/field/field.install @@ -294,7 +294,7 @@ function field_update_8002() { if (!isset($displays[$display_id])) { $displays[$display_id] = _update_8000_entity_get_display($entity_type, $bundle, $view_mode); } - $displays[$display_id]->setStatus($view_mode_settings['custom_settings']); + $displays[$display_id]->set('status', $view_mode_settings['custom_settings']); } }