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

WordPress Trac noreply at wordpress.org
Thu Sep 11 14:40:33 UTC 2014


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

Comment (by koke):

 Replying to [comment:14 markoheijnen]:
 > I'm unsure if I really got the issue at the time I commented here and
 I'm fine to delete the two lines in _prepare_post().
 > The only thing I want to be sure of is that it would not break any
 behavior for our mobile apps.

 I'm not sure about Android but I think it would break the UI in iOS.

 I don't have much to argue since there isn't a detailed documentation for
 XML-RPC, but [http://codex.wordpress.org/XML-
 RPC_WordPress_API/Posts#wp.getPostStatusList wp.getPostStatusList] returns
 this by default:

 {{{
 array(
   'draft'   => 'Draft',
   'pending' => 'Pending Review',
   'private' => 'Private',
   'publish' => 'Published'
 );
 }}}

 So I would assume those are the statuses the API recognizes. With that,
 the mobile apps translate publish + "future date" into "scheduled post".
 We don't fetch the status list dynamically, but IIRC we based the
 supported status list on that.

 I don't mind adding "future" to that list of supported statuses, but we'll
 need to fix the apps first if we want this. Even then, I wonder if that
 would break other clients.

 Replying to kailasa:
 > ...this presents a problem for someone who really needs to use XMLRPC to
 talk to the wp database (via wp.getPosts/WP_QUERY et al....) and
 distinguish between published posts and scheduled posts.

 You don't use XML-RPC to talk to the database, you use it to talk to
 WordPress.

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


More information about the wp-trac mailing list