[wp-trac] Re: [WordPress Trac] #10092: widgets randomly get added in two or more sidebars

WordPress Trac wp-trac at lists.automattic.com
Mon Jun 15 19:33:55 GMT 2009


#10092: widgets randomly get added in two or more sidebars
-------------------------------+--------------------------------------------
 Reporter:  Denis-de-Bernardy  |       Owner:  azaozz          
     Type:  defect (bug)       |      Status:  new             
 Priority:  normal             |   Milestone:  2.8.1           
Component:  Widgets            |     Version:  2.8             
 Severity:  normal             |    Keywords:  has-patch tested
-------------------------------+--------------------------------------------
Changes (by junsuijin):

  * keywords:  has-patch => has-patch tested


Comment:

 Not 100% sure this is the only means to reproduce the bug. It seems that
 if I load up several instances of any given widget, and then remove an
 instance with an id in the middle of the many others, then proceed to
 reload the admin widgets.php page, the id count for newly added instances
 of the given multi-widget starts from the now-unused id in the middle,
 which allows for any added instances past the first (or however many
 unused ids there are in the middle), to overwrite (duplicating themselves)
 the consecutive instances past the unused id(s), since additional new
 instance ids continue incrementing from the first added instance.

 I patched the 2.8 release's wp-admin/includes/widgets.php with azaozz's
 patch. After doing so new instances are always given an id past the
 highest instance id, instead of trying to utilize the unused id(s) in the
 middle. This effectively eliminates the problem since new instance ids
 cannot increment over established instance ids.

 I made a db backup at the point where the bug can be reproduced in case
 anyone needs it, but I think the described situation is the cause.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/10092#comment:10>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list