[wp-trac] [WordPress Trac] #35185: Unable to create Post via XMLRPC after upgrading to 4.4

WordPress Trac noreply at wordpress.org
Wed Dec 23 05:34:29 UTC 2015


#35185: Unable to create Post via XMLRPC after upgrading to 4.4
-----------------------------+------------------------
 Reporter:  Sandeep.Prakash  |       Owner:
     Type:  defect (bug)     |      Status:  reviewing
 Priority:  normal           |   Milestone:  4.4.1
Component:  XML-RPC          |     Version:  4.4
 Severity:  normal           |  Resolution:
 Keywords:                   |     Focuses:
-----------------------------+------------------------

Comment (by Sandeep.Prakash):

 > The null/empty values were previously stripped out, which I can
 understand would be the expected behaviour.
 >
 > With this change, it looks like every instance of `isset(
 $content_struct[..] )` needs to be changed to `! empty(
 $content_struct[...] )`.
 >
 > I could also argue that the XMLRPC client shouldn't be sending those
 fields if it doesn't intend to specify a value, which means the
 `WordPress::API` CPAN module needs updating.

 @dd32 Thank You for investing your time into the analysis of this issue.

 I see that the milestone has been set to 4.4.1, which means that the
 change would be coming in the v4.4.1.
 As a work around till the v4.4.1 goes live (which is expected in April) I
 will format the XML myself and POST it via cURL.

 I do to some extent agree to your argument that XMLRPC shouldn't be
 sending the empty fields. But on the other hand, going as per the general
 standards, an application should be able to accept {{{null}}} values if
 it's not mandatory field and perform the needed checking at it's end. But
 this is just my understanding, I may be wrong too.

 I will raise a bug on the {{{WordPress::API}}} tracker, so that it can be
 improvised. Also, sending empty fields is always an overhead.

 Once again thanks for the quick response and analysis.

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


More information about the wp-trac mailing list