WordPress.org

Support

Support » Plugins and Hacks » [Resolved] XML-RPC with WP 3.5

[Resolved] XML-RPC with WP 3.5

Viewing 5 replies - 1 through 5 (of 5 total)
  • Getting the same error. Couldn’t find the option in the *_options table.

    Turned on debugging and it produced this:

    Array
    (
        [post_id] =>
        [function] => wp.newPost
        [args] => Array
            (
                [post_title] => Antique Croc Rust
                [post_type] => fabric
                [terms_names] => Array
                    (
                        [color] => Array
                            (
                                [0] => Bronze - Brown
                            )
    
                        [grade] => Array
                            (
                                [0] =>   5
                            )
    
                        [pattern] => Array
                            (
                                [0] => Leather
                            )
    
                    )
    
                [terms] =>
                [custom_fields] => Array
                    (
                        [0] => Array
                            (
                                [key] => material_content
                                [value] => 100% Leather
                            )
    
                        [1] => Array
                            (
                                [key] => fab_num
                                [value] => 11877
                            )
    
                    )
    
                [post_status] => publish
                [post_author] =>
                [post_password] =>
                [post_excerpt] =>
                [post_date] =>
                [post_date_gmt] =>
                [post_thumbnail] =>
                [comment_status] =>
                [ping_status] =>
                [post_format] =>
                [enclosure] =>
            )
    
    )
    POST /massoud/wp-content/plugins/supra-csv-parser//xmlrpc/supra_xmlrpc.php HTTP/1.0
    Host: localhost
    Content-Type: text/xml
    User-Agent: The Incutio XML-RPC PHP Library
    Content-Length: 2337
    
    <?xml version="1.0"?>
    <methodCall>
    <methodName>wp.newPost</methodName>
    <params>
    <param><value><string></string></value></param>
    <param><value><string>[username here]</string></value></param>
    <param><value><string>[password here]</string></value></param>
    <param><value><struct>
      <member><name>post_title</name><value><string>Antique Croc Rust</string></value></member>
      <member><name>post_type</name><value><string>fabric</string></value></member>
      <member><name>terms_names</name><value><struct>
      <member><name>color</name><value><array><data>
      <value><string>Bronze - Brown</string></value>
    </data></array></value></member>
      <member><name>grade</name><value><array><data>
      <value><string>  5</string></value>
    </data></array></value></member>
      <member><name>pattern</name><value><array><data>
      <value><string>Leather</string></value>
    </data></array></value></member>
    </struct></value></member>
      <member><name>terms</name><value><string></string></value></member>
      <member><name>custom_fields</name><value><array><data>
      <value><struct>
      <member><name>key</name><value><string>material_content</string></value></member>
      <member><name>value</name><value><string>100% Leather</string></value></member>
    </struct></value>
      <value><struct>
      <member><name>key</name><value><string>fab_num</string></value></member>
      <member><name>value</name><value><string>11877</string></value></member>
    </struct></value>
    </data></array></value></member>
      <member><name>post_status</name><value><string>publish</string></value></member>
      <member><name>post_author</name><value><string></string></value></member>
      <member><name>post_password</name><value><string></string></value></member>
      <member><name>post_excerpt</name><value><string></string></value></member>
      <member><name>post_date</name><value><string></string></value></member>
      <member><name>post_date_gmt</name><value><string></string></value></member>
      <member><name>post_thumbnail</name><value><string></string></value></member>
      <member><name>comment_status</name><value><string></string></value></member>
      <member><name>ping_status</name><value><string></string></value></member>
      <member><name>post_format</name><value><string></string></value></member>
      <member><name>enclosure</name><value><string></string></value></member>
    </struct></value></param>
    </params></methodCall>
    HTTP/1.1 200 OK
    Date: Thu, 13 Dec 2012 16:50:16 GMT
    Server: Apache/2.2.22 (Unix) mod_ssl/2.2.22 OpenSSL/0.9.8r DAV/2 PHP/5.4.4
    X-Powered-By: PHP/5.4.4
    Connection: close
    Content-Length: 502
    Content-Type: text/xml; charset=UTF-8
    
    <?xml version="1.0" encoding="UTF-8"?>
    <methodResponse>
      <fault>
        <value>
          <struct>
            <member>
              <name>faultCode</name>
              <value><int>405</int></value>
            </member>
            <member>
              <name>faultString</name>
              <value><string>XML-RPC services are disabled on this site. An admin user can enable them at http://localhost/massoud/wp-admin/options-writing.php</string></value>
            </member>
          </struct>
        </value>
      </fault>
    </methodResponse>
    
    Issue successfully reported!XML-RPC services are disabled on this site. An admin user can enable them at http://localhost/massoud/wp-admin/options-writing.phpProblem Ingesting Antique Croc Rust

    Alright, not sure if this is how the plugin author wants to resolve this, but here’s a temp fix if you’re on a deadline like me.

    supra-csv-parser/xmlrpc/supra_xmlrpc_server.php

    Line 172: if ( !get_option( 'enable_xmlrpc' ) && get_bloginfo('version') < 3.5 ) {
    Line 194: if ( !get_option( 'enable_xmlrpc' ) && get_bloginfo('version') < 3.5 ) {

    I think the enable_xmlrpc option was removed from the *_options table in 3.5, so we’re adding a second conditional to check if the installation is older than version 3.5.

    Thanks Geoff, Appreciate the fix!

    No problem. I’m just glad it was easy to patch.

    Plugin Author Joseph Persie

    @zmijevik

    this patch should be in realese: 2.8.7

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘[Resolved] XML-RPC with WP 3.5’ is closed to new replies.