Make WordPress Core

Opened 10 years ago

Closed 10 years ago

Last modified 10 years ago

#37749 closed defect (bug) (invalid)

wp_update_post doesn't create revisions

Reported by: levymetal's profile levymetal Owned by:
Milestone: Priority: normal
Severity: normal Version: 4.6
Component: Posts, Post Types Keywords:
Focuses: Cc:

Description

wp_update_post() used within a theme doesn't create revisions. wp_insert_post() creates revisions as expected. Tested on a fresh 4.6 install with no plugins.

I'll have a look into the source when I get a chance to try and figure it out.

Change History (2)

#1 @levymetal
10 years ago

  • Resolution set to invalid
  • Status changed from new to closed

Ok, this is extremely strange. I've been struggling with this issue for the past two days, literally replicated it before posting the ticket, and now wp_update_post() is working as expected.

The only thing that happened is that I called wp_insert_post() to see if that made revisions. It did. After I reverted to wp_update_post(), it started creating revisions too.

On one of my other environments, wp_update_post() is still not creating revisions.

Marking as invalid. If I can find the issue I'll reopen.

#2 @SergeyBiryukov
10 years ago

  • Component changed from General to Posts, Post Types
  • Milestone Awaiting Review deleted
Note: See TracTickets for help on using tickets.