Make WordPress Core

Opened 6 years ago

Last modified 7 weeks ago

#48113 reopened defect (bug)

Update hard coded list of floating dates to use new date_floating post status arg

Reported by: timothyblynjacobs's profile TimothyBlynJacobs Owned by: timothyblynjacobs's profile TimothyBlynJacobs
Milestone: 5.3 Priority: normal
Severity: normal Version: 5.3
Component: General Keywords: has-patch has-unit-tests
Focuses: Cc:

Description

#39953 added a date_floating post status argument that clients can use to determine whether the post status is floating instead of relying on a hardcoded list.

We also need to update that hardcoded list in wp_insert_post() so that the post_date_gmt can be set to 0000-00-00 00:00:00 in that case as well.

Attachments (2)

48113.diff (1.6 KB) - added by TimothyBlynJacobs 6 years ago.
48113.2.diff (1.9 KB) - added by TimothyBlynJacobs 6 years ago.

Download all attachments as: .zip

Change History (6)

#1 @TimothyBlynJacobs
6 years ago

Added a patch. Currently there is one expected unit test failure, test_create_post_as_contributor. That should be fixed when the pending post status is marked as date_floating.

#2 @kadamwhite
6 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

In 46279:

Posts, Post Types: Build list of "date floating" post stati dynamically when inserting post.

Completes work begun in #39953 to expose "date floating" status information to frontend clients via the REST API.

Props TimothyBlynJacobs.
Fixes #48113.

#3 @SergeyBiryukov
6 years ago

In 46318:

REST API: Use delta comparison for floating date test added in [46279] to avoid race conditions.

See #48113.

#4 @SirLouen
7 weeks ago

  • Resolution fixed deleted
  • Status changed from closed to reopened

@TimothyBlynJacobs
I was reviewing other piece of code and I happened to stumble with this of mere chance.
I'm thinking if this [50012] is not being affected by the same issue as presented in this patch, at first glance it feels the exact same scenario, maybe I'm wrong.
Can you give it a check?
I'm reopening this for review but I have not dug on the topic, feel free to close it if its not related.

Note: See TracTickets for help on using tickets.