createAlbum returns string "sreate error" instead of an int AlbumID

jefjef Registered Users Posts: 42 Big grins
Yes, it really says sreate. I only get this on some of my createAlbum calls, most of the time it works just fine. The ones it fails on, it fails every time. I don't see anything unusual in the parameters for those calls vs. the others.

Comments

  • jefjef Registered Users Posts: 42 Big grins
    edited March 18, 2005
    Ah hah! It only happens on albums with an apostrophe in their description. If I remove the apostrophe, I can create the album.
  • NikolaiNikolai Registered Users Posts: 19,035 Major grins
    edited March 19, 2005
    I reported this issue several times already
    jef wrote:
    Ah hah! It only happens on albums with an apostrophe in their description. If I remove the apostrophe, I can create the album.
    ..Yet it obviously seems to be a very unimportant and/or very tough-to-fix one since it hasn't been fixed for several weeks..
    Along the same lines - there is also a problem with ' and " in album descriptions (if submitted through API).

    You see, SM UI uses multipart form based input, but API uses simple xml post, hence the problems..

    In SE I came out with workound of replacing ' with ` - lame, but better than error message..
    "May the f/stop be with you!"
  • jefjef Registered Users Posts: 42 Big grins
    edited March 19, 2005
    Yeah, I thought of going with the backquotes but ended up just removing the apostrophes. It wasn't a big deal for my own pix, but I guess for a project like SE you'd really like to get it right.

    About the ampersand issue, I removed those from my pix too. Have you played with variations like turning them into & amp ; ? Also, since it's XML you could probably encapsulate all the text as CDATA.
  • jefjef Registered Users Posts: 42 Big grins
    edited March 19, 2005
    Actually I can run those tests as easily as you.

    & amp ; - works, an & appears.
    CDATA - doesn't work, the text just disappears.
    & #x27 ; - doesn't work, the same "sreate error" as with a plain '.
  • NikolaiNikolai Registered Users Posts: 19,035 Major grins
    edited March 19, 2005
    God knows, I tried..
    jef wrote:
    Actually I can run those tests as easily as you.

    & amp ; - works, an & appears.
    CDATA - doesn't work, the text just disappears.
    & #x27 ; - doesn't work, the same "sreate error" as with a plain '.
    unfortunately, nothing seems to work so far..
    "May the f/stop be with you!"
  • NikolaiNikolai Registered Users Posts: 19,035 Major grins
    edited March 19, 2005
    March 18 Fixes
    Just retested - both ' and " works:-)thumb.gif
    "May the f/stop be with you!"
  • jefjef Registered Users Posts: 42 Big grins
    edited March 19, 2005
    Don't know what that means.

    I realized that my earlier test of CDATA was bad because the underlying tool was still escaping the anglebrackets. I re-did the test right and CDATA seems to solve all these problems. Single quote, double quote, ampersand, HTML entities, even hot links, they all go through. Yay!
  • onethumbonethumb Administrators Posts: 1,269 Major grins
    edited March 19, 2005
    jef wrote:
    Don't know what that means.

    I realized that my earlier test of CDATA was bad because the underlying tool was still escaping the anglebrackets. I re-did the test right and CDATA seems to solve all these problems. Single quote, double quote, ampersand, HTML entities, even hot links, they all go through. Yay!

    Nah, probably not CDATA. I fixed it. :)

    Don
  • jefjef Registered Users Posts: 42 Big grins
    edited March 19, 2005
    onethumb wrote:
    Nah, probably not CDATA. I fixed it. :)

    Don

    I tried the previous version of my XML-RPC tool, without the CDATA, and confirmed that the API now handles single quotes in the title and description. However it still doesn't handle things like HTML entities and hotlinks, so I'll stick with my CDATA version which does let it handle those.
Sign In or Register to comment.