Widgets shift when new sidebars added/removed
|Reported by:||batmoo||Owned by:||azaozz|
When an *empty sidebar* is removed or a *new sidebar* is adding next to an empty sidebar, widgets will shift down one sidebar.
Steps to reproduce:
- Add a bunch of sidebars, sidebar-1, sidebar-2, sidebar-3, sidebar-4 (using register_sidebar)
- Add text widgets to all of them (title them 1, 2, 3, 4 respectively)
- Remove the widget from sidebar-2 (so that it’s completely empty)
- Remove sidebar-2 (remove or comment out the register_sidebar call)
- The widgets will “shift” (sidebar-3 will be empty, sidebar-4 will have text widget titled “3″)
You can also reproduce the issue by adding a new sidebar-1.5 (instead of removing) at step 4.
It's a bit of an edge-case but is particularly a problem when you have dynamically generated sidebars (based on custom post types and taxonomies, for example) or during theme development. The first use case is becoming more common, for displaying sidebars specific to different single and archive pages.
Change History (11)
- Component changed from General to Widgets
- Keywords needs-testing added
- Milestone changed from Awaiting Review to 3.3
- Owner set to azaozz
- Resolution set to fixed
- Status changed from new to closed