[wp-trac] [WordPress Trac] #33442: Widgets not displayed if no $instance data is set

WordPress Trac noreply at wordpress.org
Wed Aug 19 18:33:08 UTC 2015

#33442: Widgets not displayed if no $instance data is set
 Reporter:  johnnyb       |      Owner:
     Type:  defect (bug)  |     Status:  new
 Priority:  normal        |  Milestone:  Awaiting Review
Component:  Widgets       |    Version:  4.3
 Severity:  normal        |   Keywords:
  Focuses:                |
 Widgets fail to render when  `$instance` is empty. This is a change from
 pre-4.3 versions of WP.

 Background: I often create single-use widgets that do one thing, so they
 don't need a title or anything. These widgets are created with empty
 `form()` and `update()` methods. After upgrading to 4.3 these widgets all
 stopped rendering.

 I'm attaching a simple plugin with 2 widgets, "Bad Widget" and "Good
 Widget." On a stock install of 4.3 running the Twenty Fifteen theme Bad
 Widget fails to render.

 Expected resolution: The pre-4.3 behaviour, where widgets would render
 even if there was no configuration for that particular widget instance.

Ticket URL: <https://core.trac.wordpress.org/ticket/33442>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform

More information about the wp-trac mailing list