Bug in the Smug API
jfriend
Registered Users Posts: 8,097 Major grins
I don't know if this is a bug in the Smugmug API or some sort of data corruption in a gallery. The issue leading to this bug report comes from a Smugmug user using the JFriend HTML5 slideshow.
The API is returning some image URLs for a gallery that do not work. I don't know if they are malformed URLs of if they are just bad objects in the gallery. Here are the details. The gallery is:
The slideshow makes this API request:
Among the data received from the API response is this item:
The images URLs in that part of the response all return 404 and do not work.
There are two items before that in the response whose image URLs return 200, but don't return any image data. Note: all three of the images that have issues are "Type": "Collected", though there are other collected images in the gallery that do not have issues in case that's a relevant clue.
So, the net result is that we get an API reponse for a list of images in a gallery and three of the images in the response have URLs that do not work. Two return 200, but no image data. One returns 404. This causes the slideshow to "stall" for a short time while these bad images timeout before it finally advances to the next images.
The API is returning some image URLs for a gallery that do not work. I don't know if they are malformed URLs of if they are just bad objects in the gallery. Here are the details. The gallery is:
http://www.photosbyadamlee.com/Landscapes/Darwin/15626057_3cw28t
The slideshow makes this API request:
/services/api/json/1.3.0/?method=smugmug.images.get&APIKey=m3fjH1x4QjX6N10RsaVUeWr0dgg2oQoZ&AlbumID=9691876&AlbumKey=CAiev&Heavy=true&CustomSize=195x127&Extras=Origin&rnd=1318780258709
Among the data received from the API response is this item:
{ "id": 1530319432, "Key": "LPVLk7K", "Album": { "id": 15626057, "Key": "3cw28t", "URL": "http://www.photosbyadamlee.com/Landscapes/Darwin/15626057_3cw28t#1530319432_LPVLk7K" }, "Caption": "", "CustomURL": "http://www.photosbyadamlee.com/Landscapes/Darwin/i-LPVLk7K/0/195x127/IMG0720-195x127.jpg", "FileName": "IMG_0720.jpg", "Format": "JPG", "Height": 708, "Keywords": "", "LargeURL": "http://www.photosbyadamlee.com/Landscapes/Darwin/i-LPVLk7K/0/L/IMG0720-L.jpg", "LastUpdated": "2011-10-15 17:05:13", "LightboxURL": "http://www.photosbyadamlee.com/Other/slideshow/9691876_hfzjmK#1530319432_LPVLk7K-A-LB", "MediumURL": "http://www.photosbyadamlee.com/Landscapes/Darwin/i-LPVLk7K/0/M/IMG0720-M.jpg", "OriginalURL": "http://www.photosbyadamlee.com/Landscapes/Darwin/i-LPVLk7K/0/O/IMG0720.jpg", "Position": 37, "Serial": 0, "Size": 107452, "SmallURL": "http://www.photosbyadamlee.com/Landscapes/Darwin/i-LPVLk7K/0/S/IMG0720-S.jpg", "ThumbURL": "http://www.photosbyadamlee.com/Landscapes/Darwin/i-LPVLk7K/0/Th/IMG0720-Th.jpg", "TinyURL": "http://www.photosbyadamlee.com/Landscapes/Darwin/i-LPVLk7K/0/Ti/IMG0720-Ti.jpg", "Type": "Collected", "URL": "http://www.photosbyadamlee.com/Other/slideshow/9691876_hfzjmK#1530319432_LPVLk7K", "Width": 1500, "X2LargeURL": "http://www.photosbyadamlee.com/Landscapes/Darwin/i-LPVLk7K/0/X2/IMG0720-X2.jpg", "XLargeURL": "http://www.photosbyadamlee.com/Landscapes/Darwin/i-LPVLk7K/0/XL/IMG0720-XL.jpg" }
The images URLs in that part of the response all return 404 and do not work.
There are two items before that in the response whose image URLs return 200, but don't return any image data. Note: all three of the images that have issues are "Type": "Collected", though there are other collected images in the gallery that do not have issues in case that's a relevant clue.
So, the net result is that we get an API reponse for a list of images in a gallery and three of the images in the response have URLs that do not work. Two return 200, but no image data. One returns 404. This causes the slideshow to "stall" for a short time while these bad images timeout before it finally advances to the next images.
--John
Homepage • Popular
JFriend's javascript customizations • Secrets for getting fast answers on Dgrin
Always include a link to your site when posting a question
Homepage • Popular
JFriend's javascript customizations • Secrets for getting fast answers on Dgrin
Always include a link to your site when posting a question
0
Comments
I've passed along your findings to our bug team, and we'll investigate more into the issue. I'm seeing the same issue you're reporting as well in the slideshow. We appreciate the detailed report!
SmugMug Support Hero
I couldn't reproduce the issue that lead to the collected image not being deleted from the album, but I've added extra logic in the API to handle this case....which is live.
Cheers,
David
SmugMug API Developer
My Photos
Homepage • Popular
JFriend's javascript customizations • Secrets for getting fast answers on Dgrin
Always include a link to your site when posting a question
That appears to be more of an image serving issue rather than an API issue. I'll do a bit of digging to see what I can turn up but it might not be as easy as resolving the other issue.
Cheers,
David
SmugMug API Developer
My Photos