[wp-trac] [WordPress Trac] #50325: Misleading error message when upload of an image fails

WordPress Trac noreply at wordpress.org
Sun Jun 7 09:21:41 UTC 2020


#50325: Misleading error message when upload of an image fails
--------------------------------------+-----------------------------
 Reporter:  Presskopp                 |       Owner:  (none)
     Type:  enhancement               |      Status:  new
 Priority:  normal                    |   Milestone:  5.5
Component:  Media                     |     Version:
 Severity:  normal                    |  Resolution:
 Keywords:  good-first-bug has-patch  |     Focuses:  administration
--------------------------------------+-----------------------------
Changes (by SergeyBiryukov):

 * milestone:  Future Release => 5.5


Comment:

 Thanks for the patch! Just noting that we have a specific message for each
 data type:

 * Could not insert link into the database
 * Could not update link in the database
 * Could not insert site into the database.
 * Could not update site in the database.
 * Could not insert post into the database
 * Could not update post in the database
 * Could not insert term into the database.
 * Could not insert term taxonomy into the database.
 * Could not insert term relationship into the database.

 So, instead of switching to a generic "item", I think it would be better
 to introduce two new strings for attachments:

 * Could not insert attachment into the database.
 * Could not update attachment in the database.

 This would also be consistent with some special cases for `'attachment'
 === $post_type` in `wp_insert_post()`, e.g. `wp_insert_attachment_data` vs
 `wp_insert_post_data` hooks and a few others.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/50325#comment:4>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list