Opened 2 years ago
Closed 2 years ago
#16673 closed defect (bug) (fixed)
_wp_translate_data() shouldn't set fields to empty values
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | 3.2 |
| Component: | Administration | Version: | |
| Severity: | normal | Keywords: | has-patch |
| Cc: | solaris.smoke@…, mikeschinkel@… |
Description
In _wp_translate_data(), there are 3 fields which are always set, regardless if their $_POST key wasn't set originally.
This prevents the array_merge() in wp_update_post() from working properly.
Example: If a custom post type doesn't support excerpts, they will be overwritten if you set them through another method.
In #13179, this was resolved by adding hidden inputs, which is kind of backwards.
Attachments (3)
Change History (11)
comment:1
solarissmoke — 2 years ago
- Cc solaris.smoke@… added
comment:2
mikeschinkel — 2 years ago
- Cc mikeschinkel@… added
comment:5
johnjamesjacoby — 2 years ago
Patch refreshed. scribu's wouldn't apply for me.
In 16673.2.diff, I also cast parent_id as integer.
- Resolution set to fixed
- Status changed from accepted to closed
In [18082]:
solarissmoke — 2 years ago
Don't need to have hidden input any more as we not longer set post_parent to empty if it's not POSTed
comment:7
follow-up:
↓ 8
solarissmoke — 2 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
I believe this means we can revert the changes made by #13179 ?

+1