diff --git a/core/lib/Drupal/Core/Entity/EntityForm.php b/core/lib/Drupal/Core/Entity/EntityForm.php index 2d7643d..988ab44 100644 --- a/core/lib/Drupal/Core/Entity/EntityForm.php +++ b/core/lib/Drupal/Core/Entity/EntityForm.php @@ -220,7 +220,8 @@ protected function actions(array $form, FormStateInterface $form_state) { '#type' => 'submit', '#value' => $this->t('Save'), '#validate' => array('::validate'), - '#submit' => ['::save'], + '#submit' => array('::submitForm', '::save'), + '#suppress_form_level_submit' => TRUE, ); if (!$this->entity->isNew() && $this->entity->hasLinkTemplate('delete-form')) { diff --git a/core/modules/comment/src/CommentForm.php b/core/modules/comment/src/CommentForm.php index cad6860..b8101c6 100644 --- a/core/modules/comment/src/CommentForm.php +++ b/core/modules/comment/src/CommentForm.php @@ -250,7 +250,8 @@ protected function actions(array $form, FormStateInterface $form_state) { '#value' => $this->t('Preview'), '#access' => $preview_mode != DRUPAL_DISABLED, '#validate' => array('::validate'), - '#submit' => ['::preview'], + '#submit' => array('::submitForm', '::preview'), + '#suppress_form_level_submit' => TRUE, ); return $element; diff --git a/core/modules/contact/src/MessageForm.php b/core/modules/contact/src/MessageForm.php index 508540b..7026863 100644 --- a/core/modules/contact/src/MessageForm.php +++ b/core/modules/contact/src/MessageForm.php @@ -158,7 +158,8 @@ public function actions(array $form, FormStateInterface $form_state) { $elements['preview'] = array( '#value' => $this->t('Preview'), '#validate' => array('::validate'), - '#submit' => ['::preview'], + '#submit' => array('::submitForm', '::preview'), + '#suppress_form_level_submit' => TRUE, ); return $elements; } diff --git a/core/modules/image/src/Form/ImageStyleEditForm.php b/core/modules/image/src/Form/ImageStyleEditForm.php index 12a7fe4..becc1db 100644 --- a/core/modules/image/src/Form/ImageStyleEditForm.php +++ b/core/modules/image/src/Form/ImageStyleEditForm.php @@ -173,7 +173,8 @@ public function form(array $form, FormStateInterface $form_state) { '#type' => 'submit', '#value' => $this->t('Add'), '#validate' => array('::effectValidate'), - '#submit' => ['::effectSave'], + '#submit' => array('::submitForm', '::effectSave'), + '#suppress_form_level_submit' => TRUE, ), ), ),