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

ngVars cause duplicate thumbnail bitstream requests #3134

Closed
bram-atmire opened this issue Jun 18, 2024 · 4 comments · Fixed by #3221
Closed

ngVars cause duplicate thumbnail bitstream requests #3134

bram-atmire opened this issue Jun 18, 2024 · 4 comments · Fixed by #3221
Assignees
Labels
affects: 7.x Issue impacts 7.x releases affects: 8.x Issue impacts 8.x releases bug claimed: Atmire Atmire team is working on this issue & will contribute back component: Item (Archived) Item display or editing
Milestone

Comments

@bram-atmire
Copy link
Member

bram-atmire commented Jun 18, 2024

Describe the bug
On pages where thumbnails are requested, Angular sends 2 requests to retrieve the bitstream instead of one.

Screenshot 2024-06-18 at 14 16 19

Cause & solution approach

This is likely caused by the use of ngVars here and here

One path to address this would be to replace the occurences with their values.

To Reproduce
Steps to reproduce the behavior:

  1. Open up inspect element
  2. Go to https://demo.dspace.org/search?spc.page=1&query=%22A%20Strength-Based%20Approach%20to%20Indigeneity,%20Equity,%20Diversity,%20and%20Inclusion%20Program%20Evaluation%20in%20Higher%20Education%22 this is a search that should return two items with thumbnails
  3. Check how many "content" requests there are

Expected behavior
There should be 2 content requests, one per file

Observed behavior
There are 2 requests per file

Related work
Link to any related tickets or PRs here.

@bram-atmire bram-atmire added bug needs triage New issue needs triage and/or scheduling labels Jun 18, 2024
@bram-atmire
Copy link
Member Author

This is affecting both 7.6.x maintenance, as well as DSpace 8

@tdonohue tdonohue added help wanted Needs a volunteer to claim to move forward component: Item (Archived) Item display or editing and removed needs triage New issue needs triage and/or scheduling labels Jun 18, 2024
@alanorth
Copy link
Contributor

Good catch, @bram-atmire! I see it on our DSpace 7.6.1 instance too, though in Firefox at least each of the second requests are cached and take 0ms.

2024-06-20T09:09:33,018418137+03:00-fs8

@tdonohue tdonohue added affects: 8.x Issue impacts 8.x releases affects: 7.x Issue impacts 7.x releases labels Jun 20, 2024
@bram-atmire
Copy link
Member Author

you're right Alan, I can also see that in Chrome, if you have "Disable Cache" DISABLED (so if caching is ON) the duplicate requests are not visible.

Nevertheless, we likely still better clean up the use of ngVars anyway.

@ybnd
Copy link
Member

ybnd commented Jul 24, 2024

We'd like to claim this one

@ybnd ybnd added claimed: Atmire Atmire team is working on this issue & will contribute back and removed help wanted Needs a volunteer to claim to move forward labels Jul 24, 2024
@tdonohue tdonohue added this to the 7.6.3 milestone Oct 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
affects: 7.x Issue impacts 7.x releases affects: 8.x Issue impacts 8.x releases bug claimed: Atmire Atmire team is working on this issue & will contribute back component: Item (Archived) Item display or editing
Projects
Development

Successfully merging a pull request may close this issue.

5 participants