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 Owned by:
Priority: normal Milestone:
Component: Posts, Post Types Version: 4.6
Severity: normal Keywords:
Cc: Focuses:

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

  • Resolutioninvalid
  • Status newclosed

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 GeneralPosts, Post Types
  • Milestone Awaiting Review
Note: See TracTickets for help on using tickets.