[wp-trac] Re: [WordPress Trac] #10300: Optimization in wp_get_sidebars_widgets() corrupts the widgets

WordPress Trac wp-trac at lists.automattic.com
Sat Jul 4 17:22:06 UTC 2009


#10300: Optimization in wp_get_sidebars_widgets() corrupts the widgets
-------------------------------+--------------------------------------------
 Reporter:  Denis-de-Bernardy  |        Owner:  azaozz  
     Type:  defect (bug)       |       Status:  reopened
 Priority:  normal             |    Milestone:  2.8.1   
Component:  Widgets            |      Version:  2.8     
 Severity:  normal             |   Resolution:          
 Keywords:  commit blocker     |  
-------------------------------+--------------------------------------------
Changes (by Denis-de-Bernardy):

  * status:  closed => reopened
  * resolution:  fixed =>


Comment:

 I'm sorry, but there still are issues. :-(

 The patch you committed still has a couple of issues when working on old-
 style widgets. In essence, the Recent Comments widget will introduce a
 workflow error, and essentially flush the sidebars during a WP 2.0 to 2.8
 upgrade, because it calls wp_get_sidebars_widgets() before all widgets are
 flushed.

 The new patch I just attached does the following:

  - ensure that the array_version conversion only occurs once, and only
 when all widgets are registered
  - ensure that the WP_Widget class conversion only occurs when
 array_version is 3 (which works fine, since it gets called several times
 on the front end)

 I've been testing it since this morning, and building my own upgrade
 scripts against it. I've yet to complete my own scripts, but so far so
 good: it's working fine with WP with all versions since 2.0, and I've yet
 to run into issues related to the slightly changed flow that I need to
 deal with.

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


More information about the wp-trac mailing list