Opened 11 years ago
Closed 11 years ago
#31808 closed defect (bug) (fixed)
Press This: unhelpful error message on post save failure.
| Reported by: | stephdau | Owned by: | SergeyBiryukov |
|---|---|---|---|
| Priority: | normal | Milestone: | 4.2 |
| Component: | Press This | Version: | 4.2 |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: |
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.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
In 31930: