Cloud-Platform icon indicating copy to clipboard operation
Cloud-Platform copied to clipboard

Unsplash Block Issues with Non-Numeric Collection IDs

Open Dan-Peck opened this issue 2 years ago • 1 comments

Describe the bug There is an issue with Unsplash collections where the collection ID contains letters or symbols and dakboard's photos block.

Actual Behavior Photos from collections containing characters other than numbers are not displayed. Instead, other random images are displayed.

  1. When a user adds a collection ID containing letters or symbols in Type > Collection - the photos from that collection are not displayed. Collection IDs containing letters and symbols don't work - only those containing numbers work.
  2. When a user adds a username and selects a collection (that has letters or symbols) using Type > User > Photos to Show - the photos from that collection are not displayed. The username and the collection ID name are correctly displayed on the screen, but the photos are wrong.

To Reproduce Steps to reproduce the behavior:

  1. Create a screen with an Unsplash photo Block
  2. Select the type "Collection"
  3. Enter in a collection ID with only numbers like "9248817"
  4. Save Changes and view your screen (Note that the collection is correctly displayed - this is what should happen to all collections)
  5. Enter in a collection ID that has other characters in it like "j54qtqvp_WE" (https://unsplash.com/collections/j54qtqvp_WE/halloween---ac)
  6. Save Changes and view your screen (Note that the collection is NOT displayed and other random images are appearing)
  7. Edit the Photo block again
  8. Select the type "User"
  9. Enter in a user id like "ameliacoccaro" (https://unsplash.com/@ameliacoccaro/collections - note that all of my collections have additional characters)
  10. Select a collection from the available list
  11. Save Changes and view your screen (Note that the collection name and user is correctly displayed, but all the images are incorrect for the selected collection)

Expected behavior

  1. When a user adds any collection ID in Type > Collection - the photos from that collection should be displayed.
  2. When a user adds any username and selects a collection using Type > User > Photos to Show - the photos from that collection should be displayed.

Screenshots image

Dan-Peck avatar Aug 30 '21 14:08 Dan-Peck

This behavior is the result of a limitation when using an older/simplified Unsplash API. Any invalid or valid non-numeric Collection IDs provided to that API will simply begin returning random photos from the Unsplash library rather than report a failure to match (or actually return the valid collection photos).

To properly support these newer non-numeric Collection ID's this will likely involve an upgrade to the latest full Unsplash API for the Unsplash Integration.

Dan-Peck avatar Aug 30 '21 14:08 Dan-Peck

Beginning analysis of conversion potential for this block to use the latest Unsplash REST API for improved Unsplash querying and overall usability.

Dan-Peck avatar Oct 11 '23 13:10 Dan-Peck

Pending further testing, review, and Unsplash review for Production level request rates.

Dan-Peck avatar Oct 13 '23 18:10 Dan-Peck

Status update: Unsplash has cleared us for API Production levels.

Dan-Peck avatar Oct 25 '23 18:10 Dan-Peck

Merged in @ 28a92bd and added to the queue for upcoming release to the live site.

Dan-Peck avatar Jan 03 '24 16:01 Dan-Peck