Opened 9 years ago
Closed 9 years ago
#31808 closed defect (bug) (fixed)
Press This: unhelpful error message on post save failure.
Reported by: | stephdau | Owned by: | SergeyBiryukov |
---|---|---|---|
Milestone: | 4.2 | Priority: | normal |
Severity: | normal | Version: | 4.2 |
Component: | Press This | Keywords: | has-patch |
Focuses: | Cc: |
Description (last modified by )
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.
Originally reported here: https://wordpress.slack.com/archives/core-pressthis/p1427516975000306
Attachments (1)
Change History (3)
Note: See
TracTickets for help on using
tickets.
In 31930: