[wp-trac] [WordPress Trac] #25089: XML-RPC server wrongly conflates post_status "future" with "publish"

WordPress Trac noreply at wordpress.org
Thu Sep 11 20:23:00 UTC 2014


#25089: XML-RPC server wrongly conflates post_status "future" with "publish"
--------------------------------------+---------------------------
 Reporter:  kailasa                   |       Owner:  markoheijnen
     Type:  defect (bug)              |      Status:  closed
 Priority:  normal                    |   Milestone:
Component:  XML-RPC                   |     Version:  3.4
 Severity:  normal                    |  Resolution:  invalid
 Keywords:  2nd-opinion dev-feedback  |     Focuses:
--------------------------------------+---------------------------

Comment (by kailasa):

 With all due respect: "I've never even used 'future' as a value for
 wp_insert_post(). It isn't necessary and it isn't meant to be used
 directly. It's an internal only status that is overridden anyway.
 'publish' should be used." is dismissive of real world media distribution
 scenarios.

 Having been in publishing since 1976,  and having had an internet site up
 and running in 1993 (our magazine was distributed on Compuserve board
 before the domain/DNS system was invented) ergo, I do have a just a tad
 bit of experience..


 A media item (any media item, and a book, or album, or song, article) is
 not "published" until it is released to the public, typically this is
 scheduled at a future date. Until then, something that is scheduled is not
 in fact published and is meant to be virtually offline/unavailable to the
 public until publication date. This translates directly into the WP blog
 posts usage requirements. Simply to declare it as "internal only" isn't
 useful dismissive this requirement

 But... not trying to be argumentative...

 The use case is really simple: if I call the "latest posts" with XML-
 RPC..you will get posts with a future date. Which breaks the intention:
 you enter a future date, so that they are hidden/unavailable to the public
 until the future. But the XML-RPC conflates  the two database fields and
 "future" posts suddenly appear as "now" posts.

 '''So: put it another way: what is the solution? How can you filter future
 posts from the XML-RPC stream of published posts?''' If there is a way, I
 will gladly drop my request. But I don't see it.

 If you want to use want to use XML-RPC to get "all current posts" and sort
 in descending order so that the latest post is on top.  (a very reasonable
 use case/requirement) By "latest" I mean published today or in the past...
 so "published in the future" does not qualify.

 Presently we have to do date string checks and manipulations to filter out
 all posts (greater then [the date(today)]) which is, IMHO, "just wrong."
 when you already have two fields in the database which clearly address the
 exact requirement I'm talking about:

 future [is not equal to] published... it's that simple. and all API's
 would ideally respect this distinction.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/25089#comment:17>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list