[wp-trac] [WordPress Trac] #50546: Add better error notices when deleting things fail

WordPress Trac noreply at wordpress.org
Fri Jul 3 21:43:02 UTC 2020


#50546: Add better error notices when deleting things fail
-----------------------------------+---------------------------------
 Reporter:  dingo_d                |       Owner:  (none)
     Type:  enhancement            |      Status:  new
 Priority:  normal                 |   Milestone:  Awaiting Review
Component:  Posts, Post Types      |     Version:
 Severity:  normal                 |  Resolution:
 Keywords:  2nd-opinion has-patch  |     Focuses:  ui, administration
-----------------------------------+---------------------------------
Changes (by SergeyBiryukov):

 * keywords:  needs-patch 2nd-opinion => 2nd-opinion has-patch
 * focuses:   => ui, administration
 * component:  Administration => Posts, Post Types


Comment:

 Thanks for the ticket!

 Yes, it would be a good idea to disambiguate these strings.

 For reference, it's currently a series of related strings:
 * Sorry, you are not allowed to move this item to the Trash.
 * Error in moving to Trash.
 * Sorry, you are not allowed to restore this item from the Trash.
 * Error in restoring from Trash.
 * Sorry, you are not allowed to delete this item.
 * Error in deleting.

 They use "this item" instead of "post" to account for custom post types,
 see [12728] / #9674. We should be able to explicitly mention "attachment"
 though.

 [attachment:50546.diff] attempts to bring some consistency:

 * Sorry, you are not allowed to move this item to the Trash.
 * Error in moving the item to Trash.
 * Sorry, you are not allowed to restore this item from the Trash.
 * Error in restoring the item from Trash.
 * Sorry, you are not allowed to delete this item.
 * Error in deleting the attachment.
 * Error in deleting the item.

 If we want further clarify what "the item" refers to, these strings should
 be added to `get_post_type_labels()`.

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


More information about the wp-trac mailing list