#22776 closed defect (bug) (fixed)
Ensure compat data is saved
| Reported by: | koopersmith | Owned by: | nacin |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.5 |
| Component: | Media | Version: | 3.5 |
| Severity: | normal | Keywords: | has-patch |
| Cc: | Focuses: |
Description
Two things for compat:
1) Some plugins were expecting compat to be rendered and saved when an image is uploaded (for things like default values of form elements). As a result, when an image is first uploaded, should we fire saveCompat?
2) The compat view should have the same save-on-removal features the attachment details have. Patch attached for that.
Attachments (1)
Change History (9)
#2
@
14 years ago
Original support thread that prompted part 1: http://wordpress.org/support/topic/doesnt-save-custom-field-selectbox-data-in-media-frame?replies=2
#4
in reply to: ↑ 3
@
14 years ago
Replying to nacin:
I don't know if we should do anything about this.
I meant for part 1.
+1 for part 2.
#6
follow-up:
↓ 7
@
14 years ago
Replying to nacin:
I don't know if we should do anything about this.
I meant for part 1. Part 2 is in.
#8
@
14 years ago
Agreed. For part 1, it's bad any way you slice it — the bottom line is that we'd have fire an ajax request any time we encounter an attachment for either render and/or insert — and all this just to provide safety for not providing default values, which is a poor development practice in its own right (regardless of the version of WordPress that you run). We're going to let part 1 ride.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Test this by opening up the edit gallery view, selecting an image, and inputting some data into a compat field. While the field is still active, click on another attachment. Did the data save?