Make WordPress Core

Opened 17 years ago

Closed 17 years ago

Last modified 17 years ago

#6349 closed defect (bug) (fixed)

Widget titles can be repetitive

Reported by: mdawaffe's profile mdawaffe Owned by: mdawaffe's profile mdawaffe
Milestone: 2.5.1 Priority: normal
Severity: normal Version: 2.5
Component: General Keywords: has-patch commit
Focuses: Cc:

Description

If you add a new widget, you'll often get a repetitive title in the admin.

Meta: Meta

We should test for this duplication and nip it in the bud.

Attachments (3)

6349.diff (682 bytes) - added by mdawaffe 17 years ago.
6349.b.diff (1.1 KB) - added by mdawaffe 17 years ago.
6349.c.diff (1.4 KB) - added by mdawaffe 17 years ago.

Download all attachments as: .zip

Change History (13)

@mdawaffe
17 years ago

#1 @matt
17 years ago

  • Resolution set to fixed
  • Status changed from new to closed

(In [7467]) Don't dupe widget titles. Fixes #6349. Hat tip: mdawaffe.

#2 @Viper007Bond
17 years ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

Shouldn't the patch be this?

if ( $widget_title && $widget_title != $sidebar_args['widget_name'] )

The original patch fixes it for the default plugins, but it's still possible to get the repetitive title bug if $widget_title != $control['name'] but $widget_title == sidebar_args['widget_name'], which it does with what I'm doing.

#3 follow-up: @mdawaffe
17 years ago

Hm... Actually - I think the references in those few lines to $sidebar_args['widget_name'] are incorrect; they should reference $control['name'], shouldn't they?

When are those two different?

#4 in reply to: ↑ 3 @Viper007Bond
17 years ago

Replying to mdawaffe:

When are those two different?

They are different with the dashboard widgets apparently.

My plugin which results in the double titles: http://files.viper007bond.com/wordpress/dashboard-widget-manager_1.0.0beta.zip

We're comparing variables A and B and then displaying variables A and C. We should either compare A and C or display A and B, i.e compare and display the same variables.

#5 @mdawaffe
17 years ago

  • Keywords has-patch commit added

It looks like we're displaying the widget name everywhere rather than the widget control name. This is probably an oversight, but it's too late to change for 2.5 now.

Attached makes everything consistent by using the widget name.

@mdawaffe
17 years ago

@mdawaffe
17 years ago

#6 @mdawaffe
17 years ago

6349.c.diff incorporates all of 6349.b.diff and fixes a bug when adding new multi-widgets (extant titles were erroneously being appended to new instances of multi-widgets).

#7 @mdawaffe
17 years ago

5823.a.diff on #5823 incorporates 6349.c.diff

#8 @mdawaffe
17 years ago

  • Milestone changed from 2.6 to 2.5.1

#9 @ryan
17 years ago

  • Resolution set to fixed
  • Status changed from reopened to closed

(In [7725]) Tweak unused widgets interface. Make widget titles less repetitive. fixes #6349 #5823 for 2.5

#10 @ryan
17 years ago

(In [7726]) Tweak unused widgets interface. Make widget titles less repetitive. fixes #6349 #5823 for trunk

Note: See TracTickets for help on using tickets.