#5 newpost using metaweblog sends blogID as a integer

open-accepted
M. J. Smith
None
5
2014-08-15
2009-08-28
Walter Cruz
No

Newpost using metaweblog sends blogID as a integer, not as a STring

<?xml version="1.0" encoding="UTF-8"?>
<methodCall>
<methodName>metaWeblog.newPost</methodName>
<params>
<param>
<value>
<int>3</int>
</value>
</param>
<param>
<value>
<string>admin</string>
</value>
</param>
<param>
<value>
<string>(password omitted)</string>
</value>
</param>
<param>
<value>
<struct>
<member>
<name>title</name>
<value>
<string>balbalbal</string>
</value>
</member>
<member>
<name>description</name>
<value>
<string>asasas</string>
</value>
</member>
<member>
<name>dateCreated</name>
<value>
<dateTime.iso8601>20090828T14:34:18</dateTime.iso8601>
</value>
</member>
<member>
<name>mt_allow_comments</name>
<value>
<boolean>0</boolean>
</value>
</member>
<member>
<name>mt_allow_pings</name>
<value>
<boolean>0</boolean>
</value>
</member>
<member>
<name>mt_text_more</name>
<value>
<string></string>
</value>
</member>
<member>
<name>mt_excerpt</name>
<value>
<string></string>
</value>
</member>
<member>
<name>mt_keywords</name>
<value>
<string></string>
</value>
</member>
</struct>
</value>
</param>
<param>
<value>
<boolean>1</boolean>
</value>
</param>
</params>
</methodCall>

The standart says that is a string http://www.sixapart.com/developers/xmlrpc/metaweblog_api/metaweblognewpost.html

Testing it with b2evolution, I got a fail with:

<?xml version="1.0"?>
<methodResponse>
<fault>
<value>
<struct><member><name>faultCode</name>
<value><int>3</int></value>
</member>
<member>
<name>faultString</name>
<value><string>Incorrect parameters passed to method: Wanted string, got int at param 1</string></value>
</member>
</struct>
</value>
</fault>
</methodResponse>Entry number:

Discussion

  • M. J. Smith
    M. J. Smith
    2010-06-09

    • assigned_to: nobody --> indigojo_uk
    • status: open --> open-accepted
     
  • M. J. Smith
    M. J. Smith
    2010-06-09

    I've entered a fix for this and it should be included with the next release. Thanks for reporting those bugs. Matt