WordPress.org

Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#9504 closed defect (bug) (fixed)

Using "Cancel" link in widget admin causes that widget to lose all its options on save

Reported by: markjaquith Owned by: ryan
Milestone: 2.8 Priority: high
Severity: major Version: 2.8
Component: Widgets Keywords: needs-patch
Focuses: Cc:

Description

Observed:

When in the Widgets admin, if you open a widget and then click the "Cancel" link, upon Saving, that widget will lose all its settings.

Expected:

Clicking "Cancel" should revert to the last saved state, resulting in no change when saved.

Change History (6)

#1 @Denis-de-Bernardy
10 years ago

Just for reference, there are two or three other tickets related to the exact same thing. And I vaguely recall this was fixed in WP 2.5 (I had reported it then).

#2 @DD32
10 years ago

  • Keywords needs-patch added; widgets removed

I vaguely recall this was fixed in WP 2.5 (I had reported it then).

This ones related to the new Widget class

#3 @ryan
10 years ago

The POST info for the widget is empty after Cancel is pressed. Edit -> Cancel -> Edit -> Done preserves the info. The new widgets are assuming that update() is always called with full info for $new_instance. We can do like the old widgets do and merge $new_instance over $old_instance. I'll hold off on that until after the UI update. Maybe we can fix Cancel.

#4 @ryan
10 years ago

I think the new UI will fix this. Will confirm once it lands.

#6 @azaozz
10 years ago

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

Ryan is right, fixed in the new UI.

Note: See TracTickets for help on using tickets.