when unable to insert comment into db (2 posts)

  1. jakub.misek
    Posted 5 years ago #

    version 2.7.1 - 2.9.2

    hi all,

    when MySQL is not properly configured and fails to insert a comment (e.g. in case of unsupported character in message), WordPress behaves inproperly; this error is not checked within the file /wp-comments-post.php and the user is redirected to an invalid page (.../wp-comments-post.php#comment-) without any message.

    There should be a check, in /wp-comments-post.php:83

    $comment_id = wp_new_comment( $commentdata );
    /*check*/if (!$comment_id) wp_die( __('Error: unable to insert the comment, because ...') );

  2. design_dolphin
    Posted 5 years ago #

    Hello @jakub-misek

    Thank you for posting this code. It might get the attention it needs under a bug report. Please see the codex on Reporting Bugs for further information on this subject.

Topic Closed

This topic has been closed to new replies.

About this Topic