Make WordPress Core

Opened 19 years ago

Closed 18 years ago

Last modified 18 years ago

#6424 closed defect (bug) (wontfix)

erroneous widget count for sidebars

Reported by: Denis-de-Bernardy Owned by:
Priority: lowest Milestone:
Component: Plugins Version: 2.5
Severity: trivial Keywords: widget
Cc: Focuses:

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 @Viper007Bond
19 years ago

  • Keywords needs-patch added
  • Priority low → lowest
  • Severity minor → trivial

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.

#2 @lloydbudd
19 years ago

  • Milestone 2.5 → 2.6

#3 @scribu
18 years ago

Bug #8035 is related to this one.

#4 @jacobsantos
18 years ago

  • Component Administration → Plugins
  • Keywords widget added; needs-patch removed
  • Milestone 2.9
  • Resolution → wontfix
  • Status new → 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.

#5 @jacobsantos
18 years ago

This is not really trivial.

#6 @Denis-de-Bernardy
18 years ago

agreed, plus it's only cosmetic. but it's still a bug. ;-)

D.

Note: See TracTickets for help on using tickets.