[wp-trac] [WordPress Trac] #16243: Unhelpful error messages when updating default category

WordPress Trac noreply at wordpress.org
Tue Jun 16 04:07:28 UTC 2015


#16243: Unhelpful error messages when updating default category
-------------------------+-----------------------------
 Reporter:  iamfriendly  |       Owner:
     Type:  enhancement  |      Status:  new
 Priority:  normal       |   Milestone:  Future Release
Component:  Taxonomy     |     Version:  3.0.4
 Severity:  normal       |  Resolution:
 Keywords:  needs-patch  |     Focuses:  administration
-------------------------+-----------------------------
Changes (by boonebgorges):

 * keywords:  has-patch ui-feedback => needs-patch
 * milestone:  Awaiting Review => Future Release


Comment:

 Replying to [comment:8 c3mdigital]:
 > I like using the same error that wp_update_term issues but not sure
 about the wp_die();  What about not doing the redirect and reload the page
 instead with the error message in the admin notice?

 Yes, but the trick is that the error message from `wp_update_term()` will
 have to be passed along to be displayed on the next page load. With other
 messages, the 'message=5' query var is used, where 5 (or whatever) matches
 an item in the `$messages` array.

 Since we're probably going to have to duplicate the text from
 `wp_update_term()` messages in the `$messages` array anyway, we should
 probably go ahead and make the text a bit friendlier. The error messages
 returned from `wp_update_term()` are meant to be shown to a developer, not
 an end user.

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


More information about the wp-trac mailing list