WordPress.org

Make WordPress Core

Opened 7 years ago

Closed 7 years ago

#6191 closed defect (bug) (fixed)

Duplicate widget bug

Reported by: Denis-de-Bernardy Owned by: mdawaffe
Milestone: 2.5 Priority: high
Severity: normal Version: 2.5
Component: Administration Keywords: has-patch needs-testing
Focuses: Cc:

Description

removing a widget that can only be inserted once, then reinserting it, adds two identical widgets

saving the changes on top of that keeps both widget

Attachments (2)

6191.diff (993 bytes) - added by mdawaffe 7 years ago.
6191.b.diff (3.4 KB) - added by mdawaffe 7 years ago.
better fix

Download all attachments as: .zip

Change History (7)

comment:1 @mdawaffe7 years ago

  • Owner changed from anonymous to mdawaffe
  • Status changed from new to assigned

@mdawaffe7 years ago

comment:2 @mdawaffe7 years ago

  • Keywords has-patch needs-testing added

comment:3 @ryan7 years ago

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

(In [7267]) Don't double insert widget. Props mdawaffe. fixes #6191

comment:4 @mdawaffe7 years ago

  • Priority changed from normal to high
  • Resolution fixed deleted
  • Status changed from closed to reopened

This JS fix actually breaks more things.

  1. Add the Links widget.
  2. Remove the Links widget.
  3. Add the Links widget.
  4. Note JS error and new page load.

The root of the problem is markup differences between that created by JS and that created by PHP.

Attached reverts the JS and fixes the problem in PHP.

@mdawaffe7 years ago

better fix

comment:5 @westi7 years ago

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

(In [7275]) Better protection against double widget insertion. Fixes #6191 props mdawaffe.

Note: See TracTickets for help on using tickets.