Skip to:
Content

bbPress.org

Opened 7 years ago

Closed 4 years ago

#3133 closed defect (bug) (fixed)

Approving a post should not reset its date

Reported by: sergeybiryukov's profile SergeyBiryukov Owned by: johnjamesjacoby's profile johnjamesjacoby
Milestone: 2.6.6 Priority: normal
Severity: normal Version:
Component: API - Moderation Keywords:
Cc:

Description

Background: #meta2963 / [meta5685].

Approving a post from Pending queue resets the post date, which should not happen.

Approving a previously unapproved post does not change its date.

The issue is that wp_update_post() overwrites the date for pending posts, unless the post already has a non-empty post_date_gmt, or a non-empty $postarr['edit_date'] is passed to the function.

Change History (9)

#1 @johnjamesjacoby
7 years ago

  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to 2.6.1
  • Owner set to johnjamesjacoby

#2 @johnjamesjacoby
5 years ago

  • Milestone changed from 2.6.1 to 2.6.2

Move these to 2.6.2.

#3 @johnjamesjacoby
5 years ago

  • Keywords needs-testing added
  • Milestone changed from 2.6.2 to 2.6.3

It's plausible this was unintentionally fixed in 2.6.0, in relation to other last-activity and count fixes.

This needs more testing.

#4 @johnjamesjacoby
5 years ago

  • Milestone changed from 2.6.3 to 2.6.4

#5 @johnjamesjacoby
5 years ago

  • Milestone changed from 2.6.4 to 2.6.5

Moving open issues from 2.6.4 to 2.6.5, for 2.6.4 release today.

#6 @johnjamesjacoby
5 years ago

  • Milestone changed from 2.6.5 to 2.6.6

#7 @johnjamesjacoby
4 years ago

In 7122:

Moderation: when approving topics & replies, manually set post_date_gmt.

This commit is necessary to prevent wp_update_post() from marking these posts as having been published immediately, instead of their original post_date.

In trunk, for 2.7.

Props SergeyBiryukov.

See #3133.

#8 @johnjamesjacoby
4 years ago

In 7123:

Moderation: when approving topics & replies, manually set post_date_gmt.

This commit is necessary to prevent wp_update_post() from marking these posts as having been published immediately, instead of their original post_date.

In branches/2.6, for 2.6.6.

Props SergeyBiryukov.

See #3133.

#9 @johnjamesjacoby
4 years ago

  • Keywords needs-patch needs-testing removed
  • Resolution set to fixed
  • Status changed from new to closed
Note: See TracTickets for help on using tickets.