diff --git a/modules/comment.module b/modules/comment.module index a6f848f743b68e3df1985acf9f44021e739ef53f..ac086f445de0b4d6a90117eef8c72c2989b29945 100644 --- a/modules/comment.module +++ b/modules/comment.module @@ -1400,7 +1400,10 @@ function theme_comment_form($edit, $title) { $form .= form_submit(t('Preview comment')); - if (!variable_get('comment_preview', 1) || ($_POST['op'] == t('Preview comment') && !form_get_errors())) { + // Only show post button if preview is optional or if we are in preview mode. + // We show the post button in preview mode even if there are form errors so that + // optional form elements (e.g., captcha) can be updated in preview mode. + if (!variable_get('comment_preview', 1) || ($_POST['op'] == t('Preview comment')) || ($_POST['op'] == t('Post comment'))) { $form .= form_submit(t('Post comment')); } diff --git a/modules/comment/comment.module b/modules/comment/comment.module index a6f848f743b68e3df1985acf9f44021e739ef53f..ac086f445de0b4d6a90117eef8c72c2989b29945 100644 --- a/modules/comment/comment.module +++ b/modules/comment/comment.module @@ -1400,7 +1400,10 @@ function theme_comment_form($edit, $title) { $form .= form_submit(t('Preview comment')); - if (!variable_get('comment_preview', 1) || ($_POST['op'] == t('Preview comment') && !form_get_errors())) { + // Only show post button if preview is optional or if we are in preview mode. + // We show the post button in preview mode even if there are form errors so that + // optional form elements (e.g., captcha) can be updated in preview mode. + if (!variable_get('comment_preview', 1) || ($_POST['op'] == t('Preview comment')) || ($_POST['op'] == t('Post comment'))) { $form .= form_submit(t('Post comment')); }