Ticket #9084 (closed defect (bug): fixed)
Problem when wp_insert_post_data filter changes post status
| Reported by: |
|
Owned by: |
|
|---|---|---|---|
| Priority: | normal | Milestone: | 2.8 |
| Component: | General | Version: | 2.7 |
| Severity: | major | Keywords: | has-patch tested commit |
| Cc: |
Description
wp_insert_post() calls wp_insert_post_data filter and then continues without updating local variables. This can cause problems when filter will change them. I found this issue after I created plugin which changes posts status back to Draft if some conditions are not met. After this status change transition_post_status action is invoked with incorrect new state parameter. Because of this WP Status Notifier plugin incorrectly sends emails with notifications.
Attachments
Change History
- Keywords tested added; needs-testing removed
- Milestone changed from 2.7.2 to 2.8
new patch prevents the needless and potentially overwriting of too much data
- Owner changed from anonymous to Denis-de-Bernardy
- Status changed from new to accepted
Note: See
TracTickets for help on using
tickets.

