<string/>

NikolaiNikolai Registered Users Posts: 19,035 Major grins
Man, it got me..

In case of empty album title response looks like
<VALUE><STRING /></VALUE>

[PHP] <value><string/></value>[/PHP]
not like

[PHP] <value><string></string></value>[/PHP]
I understand that it's a valid XML code, but I was not prepared for that and my parser was choking on it.. Took me a while to figure out what's wrong..

New version (build 120) takes care of this situation..
"May the f/stop be with you!"

Comments

  • devbobodevbobo Registered Users, Retired Mod Posts: 4,339 SmugMug Employee
    edited April 15, 2005
    huh ?
    Nikolai wrote:
    Man, it got me..

    In case of empty album title response looks like
    <value><string></string>

    [PHP] [/PHP]
    not like

    [PHP] [/PHP]
    I understand that it's a valid XML code, but I was not prepared for that and my parser was choking on it.. Took me a while to figure out what's wrong..

    New version (build 120) takes care of this situation..
    </value></value>
    David Parry
    SmugMug API Developer
    My Photos
  • NikolaiNikolai Registered Users Posts: 19,035 Major grins
    edited April 15, 2005
    <string/>
    devbobo wrote:
    huh ?

    </VALUE></VALUE>
    :-)

    One of my long-term customers contacted me recently and informed me that S*E has trouble shoiwng some of his albums. After very extensive troubleshooting I found out that the real reason was he had few albums without names. In which case getAlbums method would return simply < string/ > <STRING />instead of < string > < /string ><STRING></STRING>, and my parser would choke on it and bail out, ignoring the rest of the response data (which contained those "missing" albums info)..
    "May the f/stop be with you!"
  • onethumbonethumb Administrators Posts: 1,269 Major grins
    edited April 15, 2005
    Nikolai wrote:
    :-)

    One of my long-term customers contacted me recently and informed me that S*E has trouble shoiwng some of his albums. After very extensive troubleshooting I found out that the real reason was he had few albums without names. In which case getAlbums method would return simply < string/ > <STRING />instead of < string > < /string ><STRING></STRING>, and my parser would choke on it and bail out, ignoring the rest of the response data (which contained those "missing" albums info)..

    Wait, albums without names? That shouldn't be allowed. Which albums were they?

    Don
  • NikolaiNikolai Registered Users Posts: 19,035 Major grins
    edited April 15, 2005
    Don,
    onethumb wrote:
    Wait, albums without names? That shouldn't be allowed. Which albums were they?

    Don
    They were some old albums (not mine:-), probably from the times when SM UI was allowing these things.
    I cannot give you exact IDs now (my debugging logs are at home, and I'm at work already). I would assume you can look for empty/null entries in your database. If not - let me know if you need those IDs, I'll email them to support@smugmug.com tonight.

    Cheers!1drink.gif
    "May the f/stop be with you!"
  • Broke GuyBroke Guy Registered Users Posts: 30 Big grins
    edited April 29, 2005
    at least they caught a bug in S*E :)
  • NikolaiNikolai Registered Users Posts: 19,035 Major grins
    edited April 29, 2005
    Yep
    Broke Guy wrote:
    at least they caught a bug in S*E :)
    They are still lurking there sometimes, those nasty little bastards;-)
    "May the f/stop be with you!"
Sign In or Register to comment.