diff --git a/core/modules/field_ui/lib/Drupal/field_ui/OverviewBase.php b/core/modules/field_ui/lib/Drupal/field_ui/OverviewBase.php index c56ac96..7ea8391 100644 --- a/core/modules/field_ui/lib/Drupal/field_ui/OverviewBase.php +++ b/core/modules/field_ui/lib/Drupal/field_ui/OverviewBase.php @@ -46,9 +46,9 @@ * {@inheritdoc} */ public function buildForm(array $form, array &$form_state, $entity_type = NULL, $bundle = NULL) { - // Seriously, I hate comment module. - if ($entity_type == 'comment') { - $bundle = "comment_node_$bundle"; + // @todo Comment has its own magical bundle naming. + if ($entity_type == 'comment' && module_exists('comment')) { + $bundle = comment_node_type_load($bundle); } form_load_include($form_state, 'inc', 'field_ui', 'field_ui.admin'); diff --git a/core/modules/file/lib/Drupal/file/Tests/FileFieldWidgetTest.php b/core/modules/file/lib/Drupal/file/Tests/FileFieldWidgetTest.php index 654859f..8268999 100644 --- a/core/modules/file/lib/Drupal/file/Tests/FileFieldWidgetTest.php +++ b/core/modules/file/lib/Drupal/file/Tests/FileFieldWidgetTest.php @@ -205,6 +205,7 @@ function testPrivateFileSetting() { $type_name = 'article'; $field_name = strtolower($this->randomName()); $this->createFileField($field_name, $type_name); + $instance = field_info_instance('node', $field_name, $type_name); $test_file = $this->getTestFile('text');