diff --git a/core/modules/system/lib/Drupal/system/Plugin/views/area/Entity.php b/core/modules/system/lib/Drupal/system/Plugin/views/area/Entity.php index 84fb000..d5705a6 100644 --- a/core/modules/system/lib/Drupal/system/Plugin/views/area/Entity.php +++ b/core/modules/system/lib/Drupal/system/Plugin/views/area/Entity.php @@ -64,12 +64,6 @@ protected function defineOptions() { public function buildOptionsForm(&$form, &$form_state) { parent::buildOptionsForm($form, $form_state); - $form['entity_id'] = array( - '#title' => t('ID'), - '#type' => 'textfield', - '#default_value' => $this->options['entity_id'], - ); - $options = $this->buildViewModeOptions(); $form['view_mode'] = array( '#type' => 'select', @@ -78,8 +72,16 @@ public function buildOptionsForm(&$form, &$form_state) { '#default_value' => $this->options['view_mode'], ); + $form['entity_id'] = array( + '#title' => t('ID'), + '#type' => 'textfield', + '#default_value' => $this->options['entity_id'], + ); + // Add tokenization form elements. $this->tokenForm($form, $form_state); + + } /** diff --git a/core/modules/system/system.views.inc b/core/modules/system/system.views.inc index bd890f2..a0a3ae5 100644 --- a/core/modules/system/system.views.inc +++ b/core/modules/system/system.views.inc @@ -13,14 +13,17 @@ function system_views_data_alter(&$data) { // Registers on area per entity type. foreach (entity_get_info() as $entity_type => $entity_info) { - $label = $entity_info['label']; - $data['views']['entity_' . $entity_type] = array( - 'title' => $label, - 'help' => t('Shows an @label in the area.', array('@label' => $label)), - 'area' => array( - 'entity_type' => $entity_type, - 'id' => 'entity', - ), - ); + // Views already have a custom area handler. + if ($entity_type != 'views') { + $label = $entity_info['label']; + $data['views']['entity_' . $entity_type] = array( + 'title' => t('Rendered @entity_label', array('@entity_label' => $label)), + 'help' => t('Shows an @label in the area.', array('@label' => $label)), + 'area' => array( + 'entity_type' => $entity_type, + 'id' => 'entity', + ), + ); + } } }