Opened 4 years ago

Closed 4 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
Priority: high Milestone: 2.8
Component: Widgets Version: 2.8
Severity: major Keywords: needs-patch
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)

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).

comment:2   DD324 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

comment:3   ryan4 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.

comment:4   ryan4 years ago

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

  • 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.