diff --git a/core/modules/comment/comment.module b/core/modules/comment/comment.module index 7aa3d59..0840496 100644 --- a/core/modules/comment/comment.module +++ b/core/modules/comment/comment.module @@ -1069,15 +1069,18 @@ function comment_view_multiple($comments, $view_mode = 'full', $langcode = NULL) * Implements hook_form_FORM_ID_alter() for field_ui_field_edit_form(). */ function comment_form_field_ui_field_edit_form_alter(&$form, $form_state) { - // Collect translation settings. - if (module_exists('translation_entity')) { - array_unshift($form['#submit'], 'comment_translation_configuration_element_submit'); - } - // Hide required checkbox. - $form['instance']['required']['#access'] = FALSE; + if ($form['#field']['type'] == 'comment') { + // Collect translation settings. + if (module_exists('translation_entity')) { + array_unshift($form['#submit'], 'comment_translation_configuration_element_submit'); + } - // Force cardinality to one. - $form['field']['cardinality']['#options'] = drupal_map_assoc(array(1)); + // Hide required checkbox. + $form['instance']['required']['#access'] = FALSE; + + // Force cardinality to one. + $form['field']['cardinality']['#options'] = drupal_map_assoc(array(1)); + } } /**