Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Item thumbnails do not initially display after running filter-media #797

Closed
carlj11 opened this issue Jul 15, 2020 · 8 comments
Closed

Item thumbnails do not initially display after running filter-media #797

carlj11 opened this issue Jul 15, 2020 · 8 comments
Assignees
Labels
bug component: Item (Archived) Item display or editing performance / caching Related to performance, caching or embedded objects won't fix
Milestone

Comments

@carlj11
Copy link

carlj11 commented Jul 15, 2020

Not sure if this is a bug or if I'm missing some configuration parameter or page setting (I'm new to angular) that determines thumbnail display for simple and full item views, or if this is functionality that hasn't been fully implemented yet. After running filter-media for items show an empty icon with 'No Thumbnail' and I can only get thumbnails to display after I've gone from simple item page view to full item page and then back again to simple item page view. Thumbnails are for jpg's and .pdf's and happens with each browser session.

I'm on the dspace-angular and rest-api snapshots from 7/14.

Carl

@carlj11 carlj11 added bug needs triage New issue needs triage and/or scheduling labels Jul 15, 2020
@tdonohue
Copy link
Member

@carlj11 : A quick question about what you are seeing.

It sounds like you are able to get Thumbnails to appear, but only after leaving the page and going back again? Is that correct?

If so, I highly suspect this is a caching issue in the Angular UI (and not a configuration issue or anything). It sounds like the UI is caching the old "No Thumbnail" empty icon, and only reloads that cache after you leave the page and go back again.

If I've misunderstood, please let me know. I'm trying to determine exactly what you are seeing though, so that I know how to schedule this bug ticket.

@tdonohue tdonohue added the component: Item (Archived) Item display or editing label Jul 17, 2020
@carlj11
Copy link
Author

carlj11 commented Jul 17, 2020 via email

@carlj11
Copy link
Author

carlj11 commented Jul 17, 2020 via email

@carlj11
Copy link
Author

carlj11 commented Jul 17, 2020 via email

@tdonohue
Copy link
Member

@carlj11 : This sounds suspiciously like a caching issue in the UI, especially if it works OK after visiting an item previously.

One final question, what browser are you using? I'll see if we can find someone else who can reproduce the bug, and if so, hopefully we can figure out why the thumbnails are not loading immediately.

@tdonohue tdonohue added the performance / caching Related to performance, caching or embedded objects label Jul 17, 2020
@tdonohue
Copy link
Member

I tested this more thoroughly today. I'm able to reproduce this in Google Chrome by doing the following:

  1. Visit an Item page with no thumbnail. You'll see the "No Thumbnail" default icon.
  2. Behind the scenes, run filter-media script to create a Thumbnail for that item. Thumbnail is created
  3. Go back to that Item page. The "No Thumbnail" default icon still is shown.
  4. Hard refresh in browser (Ctrl + Refresh button), and the page reloads and the Thumbnail is now shown.

I suspect this may be a caching issue in the UI. I think the "No Thumbnail" icon is being cached until the Item is reloaded in the cache...at which point the new Thumbnail image is discovered and displayed. Scheduling this tentatively for beta 5.

@tdonohue tdonohue removed the needs triage New issue needs triage and/or scheduling label Aug 21, 2020
@tdonohue tdonohue added this to To Do in DSpace 7 Beta 5 via automation Aug 21, 2020
@tdonohue tdonohue added this to the 7.0beta5 milestone Aug 21, 2020
@artlowel
Copy link
Member

This is indeed due to the cache, and doesn't seem like a bug to me. The item will be cached by default for 15 minutes after which it will be reloaded (once #739 is complete anyway) and the thumbnail will be shown.

There's no way the UI can know you've run filter-media in the mean time, not unless we add ETag support or something similar. So for now, if an admin knows they've run filter-media and want to see the result immediately they can always do a hard refresh. Other users will see it at most 15 minutes later.

@artlowel artlowel assigned tdonohue and unassigned artlowel Oct 14, 2020
@tdonohue
Copy link
Member

@artlowel : Thanks for the response here. Based on your feedback, I'm going to close this as "won't fix".

I agree that it's OK if thumbnails are cached temporarily (as it's for performance reasons), and that caching thumbnails for 15mins or until a hard refresh (Ctrl + Refresh in user's browser) is done is perfectly OK.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug component: Item (Archived) Item display or editing performance / caching Related to performance, caching or embedded objects won't fix
Projects
None yet
Development

No branches or pull requests

3 participants