[wp-trac] Re: [WordPress Trac] #1528: Error when submitting newPost using PHPXMLRPC

WordPress Trac wp-trac at lists.automattic.com
Fri Feb 23 09:18:33 GMT 2007


#1528: Error when submitting newPost using PHPXMLRPC
---------------------+------------------------------------------------------
 Reporter:  chazegh  |        Owner:  anonymous
     Type:  defect   |       Status:  new      
 Priority:  normal   |    Milestone:  2.2      
Component:  XML-RPC  |      Version:  1.5.2    
 Severity:  normal   |   Resolution:           
 Keywords:           |  
---------------------+------------------------------------------------------
Changes (by westi):

  * milestone:  => 2.2

Comment:

 Replying to [comment:4 Omegas]:
 > I can confirm that this issue is still present in 1.5.2. Posting through
 the XML-RPC interface works as long as you don't provide a dateCreated key
 with the post. The solution presented by chazegh works but isn't very
 robust since the IXR_Date class constructor is very strict when parsing
 the date string and the same applies to WP's own iso_8601 functions. The
 format coming from an XML-RPC client must be exactly
 YYYYMMDDThh:mm:ss[+-]ZZZZ or everything breaks... I've seen lots of
 software using YYYY-MM-DDThh:mm:ss[+-]ZZ:ZZ format as "ISO-8601" so I
 really think WP should be more relaxed when them. Adding conditional '-'s
 and ':'s in the regexps isn't really that hard after all...

 This sounds like a reasonable change.  As far as I remember the -'s and
 :'s are optional in iso8601 so the date is valid with and without them.

 The example in the '[http://www.xmlrpc.com/spec spec]' has no -'s but does
 have the :'s confusingly - {{{19980717T14:08:55}}}

-- 
Ticket URL: <http://trac.wordpress.org/ticket/1528#comment:6>
WordPress Trac <http://trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list