diff --git a/core/lib/Drupal/Core/Entity/EntityFormController.php b/core/lib/Drupal/Core/Entity/EntityFormController.php index 276ac34..c3e149b 100644 --- a/core/lib/Drupal/Core/Entity/EntityFormController.php +++ b/core/lib/Drupal/Core/Entity/EntityFormController.php @@ -218,7 +218,7 @@ public function processForm($element, $form_state, $form) { if (!$this->getFormDisplay($form_state)->getComponent($extra_field)) { $element[$extra_field]['#access'] = FALSE; } - else { + elseif (!isset($element[$extra_field]['#weight'])) { $element[$extra_field]['#weight'] = $info['weight']; } } diff --git a/core/modules/comment/lib/Drupal/comment/CommentFormController.php b/core/modules/comment/lib/Drupal/comment/CommentFormController.php index 3cef2ff..48fed21 100644 --- a/core/modules/comment/lib/Drupal/comment/CommentFormController.php +++ b/core/modules/comment/lib/Drupal/comment/CommentFormController.php @@ -46,9 +46,7 @@ public function form(array $form, array &$form_state) { $form += $form_state['comment_preview']; } - $form['author'] = array( - '#weight' => 10, - ); + $form['author'] = array(); // Display author information in a details element for comment moderators. if ($is_admin) { $form['author'] += array(