[wp-trac] [WordPress Trac] #31808: Press This: unhelpful error message on post save failure.

WordPress Trac noreply at wordpress.org
Mon Mar 30 14:10:26 UTC 2015


#31808: Press This: unhelpful error message on post save failure.
--------------------------+-----------------------
 Reporter:  stephdau      |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  4.2
Component:  Press This    |    Version:  trunk
 Severity:  normal        |   Keywords:  has-patch
  Focuses:                |
--------------------------+-----------------------
 We use a generic error message when we fail to save the post, which can be
 due something as simple as not having post title and content:
 https://cloudup.com/c9uxsiqQOIU

 {{{
 if ( is_wp_error( $updated ) || intval( $updated ) < 1 ) {
         wp_send_json_error( array( 'errorMessage' => __( 'Error while
 saving the post. Please try again later.' ) ) );
 } else {
 }}}

 We should instead use `$updated->get_error_message()` to let the user know
 exactly what happened: https://cloudup.com/cT5H53fr5Ic

 See attached patch.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/31808>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list