[wp-trac] [WordPress Trac] #8119: Attempts to edit deleted categories are not properly handled

WordPress Trac wp-trac at lists.automattic.com
Sat Nov 8 21:32:21 GMT 2008


#8119: Attempts to edit deleted categories are not properly handled
---------------------+------------------------------------------------------
 Reporter:  mrmist   |       Owner:  anonymous
     Type:  defect   |      Status:  new      
 Priority:  normal   |   Milestone:  2.8      
Component:  General  |     Version:  2.7      
 Severity:  normal   |    Keywords:           
---------------------+------------------------------------------------------
 Fairly obscure.

 If one user has the edit cats view open, then another user deletes one of
 those categories, and the first user then attempts to edit the deleted
 category, they get - not unreasonably - an empty view on the edit screen.
 (As the data has been correctly deleted.) Ok. Not too much we can do about
 that.  However, after that, it falls down.

 It seems that if you replace the various data and then press "edit
 category" it can go one of two ways -

 1. The user recieves the message

 Your attempt to edit this category: "" has failed.

 2. The user recieves the message

 Fatal error: Cannot use object of type WP_Error as array in
 /home/www/misthaveneu/htdocs/svn/trunk/wp-includes/functions.php on line
 1238

 Scenerio 2 seems to be vaguely related to using the word "Error" in the
 description, but that could just be conincidence.

 In any event, the handling of this situation is broken.  The fact that a
 category has been deleted since in-between the user viewing the edit
 category screen and choosing one to edit needs to be recognised. (Even if
 it's the same sort of nasty wp_die message you get when a post has been
 deleted.)

-- 
Ticket URL: <http://trac.wordpress.org/ticket/8119>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list