#6424 closed defect (bug) (wontfix)
erroneous widget count for sidebars
Reported by: | Denis-de-Bernardy | Owned by: | |
---|---|---|---|
Milestone: | Priority: | lowest | |
Severity: | trivial | Version: | 2.5 |
Component: | Plugins | Keywords: | widget |
Focuses: | Cc: |
Description
activate a plugin that adds new widgets, and insert that widget in a sidebar. You get something like:
"You are using 2 widgets in the "Sidebar" sidebar."
deactivate the plugin. the widget no longer exists. You still get:
"You are using 2 widgets in the "Sidebar" sidebar."
Change History (6)
#1
@
16 years ago
- Keywords needs-patch added
- Priority changed from low to lowest
- Severity changed from minor to trivial
#4
@
16 years ago
- Component changed from Administration to Plugins
- Keywords widget added; needs-patch removed
- Milestone 2.9 deleted
- Resolution set to wontfix
- Status changed from new to closed
WordPress widgets are going to get an overhaul in 2.9 and hopefully they would have corrected the cause of this.
The reason for this is that the sidebar widget option is not being updated. Really it could be considered the fault of the plugin author for not removing their widget, but WordPress should also consider sidebars that no longer exist and widgets that no longer exist.
Note: See
TracTickets for help on using
tickets.
Thought I'd throw in an explanation of what's going on since I've been working with widgets lately.
This is happening because that plugin's widget is still technically in the sidebar, but it just doesn't show up because it doesn't exist. Note that if you re-activate the plugin, the widget will be back in your sidebar exactly where you put it rather than on the left side in the unused widgets list. If you hit save which will refresh the sidebar array, the non-existent widget will be removed.
This inaccurate count occurs because that number is just a simple
count($widgets)
and done before the widgets are outputted and actually checked to see if they exist.