weird smugmug.images.changeSettings bug?

liggittliggitt Registered Users Posts: 35 Big grins
Looking at the documentation here:
http://wiki.smugmug.net/display/SmugMug/smugmug.images.changeSettings+1.2.0
it's not clear where the ImageKey should be included. Doing the call without including the ImageKey returns a system error (which isn't surprising).

However, if I include the ImageKey immediately after the ImageID, the call "succeeds", but the image's caption and keywords are overwritten with the first character of the ImageKey (which is weird).

I've seen this on both the 1.2.0 and the 1.2.1 version, using the XML-RPC API.

Any ideas?

Comments

  • devbobodevbobo Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
    edited November 19, 2008
    Can you please post your rpc request for me to have a look at ?

    Thanks,

    David
    David Parry
    SmugMug API Developer
    My Photos
  • liggittliggitt Registered Users Posts: 35 Big grins
    edited November 19, 2008
    <?xml version="1.0"?>
    <methodCall>
        <methodName>smugmug.images.changeSettings</methodName>
        <params>
            <param>
                <value>MY SESSION ID</value>
            </param>
            <param>
                <value>
                    <int>MY IMAGE ID</int>
                </value>
            </param>
            <param>
                <value>MY IMAGE KEY</value>
            </param>
            <param>
                <value>
                    <struct>
                        <member>
                            <name>Hidden</name>
                            <value>
                                <boolean>0</boolean>
                            </value>
                        </member>
                    </struct>
                </value>
            </param>
        </params>
    </methodCall>
    
  • devbobodevbobo Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
    edited November 19, 2008
    This is one of the reasons why I have changed the xml-rpc spec for 1.2.2, xml-rpc as that request sent requires parameters to be sent in a particular order and if parameters are switched or additional ones entered, things can go haywire. From 1.2.2+, all parameters in an xml-rpc request need to be sent as a name/value pair.

    I need to look at this a bit closer, but I'm sure that ImageKey shouldn't be sent in this method call.

    Just as a matter of interest, is there any reason you chose xml-rpc over any of the other formats ?
    David Parry
    SmugMug API Developer
    My Photos
  • liggittliggitt Registered Users Posts: 35 Big grins
    edited November 19, 2008
    devbobo wrote:
    This is one of the reasons why I have changed the xml-rpc spec for 1.2.2, xml-rpc as that request sent requires parameters to be sent in a particular order and if parameters are switched or additional ones entered, things can go haywire. From 1.2.2+, all parameters in an xml-rpc request need to be sent as a name/value pair.

    I need to look at this a bit closer, but I'm sure that ImageKey shouldn't be sent in this method call.
    Ok, so here's how I was trying the call without the ImageKey:
    <?xml version="1.0"?>
    <methodCall>
        <methodName>smugmug.images.changeSettings</methodName>
        <params>
            <param>
                <value>MY SESSION ID</value>
            </param>
            <param>
                <value>
                    <int>MY IMAGE ID</int>
                </value>
            </param>
            <param>
                <value>
                    <struct>
                        <member>
                            <name>Hidden</name>
                            <value>
                                <boolean>0</boolean>
                            </value>
                        </member>
                    </struct>
                </value>
            </param>
        </params>
    </methodCall>
    

    In response to this, I get an error #5 with the message "system error". Since adding the ImageKey at least made it work (with weird side effects), I assumed it was necessary.
    devbobo wrote:
    Just as a matter of interest, is there any reason you chose xml-rpc over any of the other formats ?
    I started my project a few years ago in Java, found an XML-RPC library that worked alright, and never overcame the inertia :)
Sign In or Register to comment.