diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/argument_validator/Entity.php b/core/modules/views/lib/Drupal/views/Plugin/views/argument_validator/Entity.php index c087ec7..6b48f4e 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/argument_validator/Entity.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/argument_validator/Entity.php @@ -101,12 +101,14 @@ public function buildOptionsForm(&$form, &$form_state) { } $storage_controller = $this->entityManager->getStorageController($entity_type); $fields = $storage_controller->baseFieldDefinitions(); + $bundles_title = empty($entity_definitions[$entity_type]['bundle_label']) ? 'Bundles' : $entity_definitions[$entity_type]['bundle_label']; + $bundle_name = empty($fields[$bundle_type]) || empty($fields[$bundle_type]['label']) ? 'bundles' : $fields[$bundle_type]['label']; $form['bundles'] = array( - '#title' => $entity_definitions[$entity_type]['bundle_label'], + '#title' => $bundles_title, '#default_value' => $this->options['bundles'], '#type' => 'checkboxes', '#options' => $bundle_options, - '#description' => t('Restrict to one or more %bundle_name. If none selected all are allowed.', array('%bundle_name' => $fields[$bundle_type]['label'])), + '#description' => t('Restrict to one or more %bundle_name. If none selected all are allowed.', array('%bundle_name' => $bundle_name)), ); }