baltimorecounty / baltimorecountymd.gov-assets

Baltimore County Government Website Assets
3 stars 1 forks source link

Flickr API Issue on Homepage #274

Closed theilman7 closed 5 years ago

theilman7 commented 5 years ago

Describe the bug The Flickr image gallery on the .gov homepage has broken images, stemming from the API.

To Reproduce Steps to reproduce the behavior:

  1. Visit: https://www.baltimorecountymd.gov/index.html
  2. View the "Photo Stream" photo gallery, just under the carousel.
  3. The most recent images appear broken.

Expected behavior All image thumbnails appear in the gallery .

Desktop (please complete the following information): Can be recreated across all browsers. Currently utilizing Chrome 73.0.3683.103.

Additional context After completing some initial troubleshooting, I'd wager the issue is stemming from the API, more specifically within the "farm" variable in the API: https://api.flickr.com/services/rest/?method=flickr.photos.search&api_key=ee58ce6536e4b39a95ebdf000ae4adf3&tags=featured&per_page=4&user_id=56007743@N08&format=json&jsoncallback=jQuery1111038798209652981064_1555613929687&_=1555613929688:formatted

Example:

The API is returning the {farm} variable 66 in the broken URLs. See link below... https://farm66.static.flickr.com/65535/46913647914_69d58fbb00_q.jpg

If you switch the variable to 8, this fixes the url: https://farm8.static.flickr.com/65535/46913647914_69d58fbb00_q.jpg

Refer to homepage.min.js on line 8341 to see an example of how the image url template is built with the API.

martypowell commented 5 years ago

Looked at the response from flickr and the three records that aren't showing have their farm data set to 66 as @theilman7 stated but I'm not sure what that even means (think maybe its related to a server farm where the photos live), and why 8 just happens to work. I'm guessing that is not something we set in flickr?

Found this from 2015, https://www.flickr.com/groups/51035612836@N01/discuss/72157661550073809/

So maybe this is something we just need to ride out?

@danfox01

martypowell commented 5 years ago

I reached out to flickr support on twitter, I'll update this thread if I hear anything back.

martypowell commented 5 years ago

@danfox01 @theilman7 flickr got back to us and said this is an issue, their developers are aware and are actively working on a resolution.

jdomasky commented 5 years ago

Hi! Today I've noticed the Flickr image gallery in dev seems to be working OK with farm66 thumbnails. Perhaps it's safe to restore the gallery in prod? Dev home page: https://dev.baltimorecountymd.gov/index.html

sdurphy commented 5 years ago

Looks like we are back in business. I can restore on prod.