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: |
|
Owned by: |
|
|---|---|---|---|
| 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)
- 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
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.
See also: #9511

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