Bug 30792 - Item cover images don't load in "Other holdings" tab
Summary: Item cover images don't load in "Other holdings" tab
Status: RESOLVED DUPLICATE of bug 30234
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on: 26145
Blocks:
  Show dependency treegraph
 
Reported: 2022-05-17 14:26 UTC by Owen Leonard
Modified: 2022-06-08 12:37 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2022-05-17 14:26:28 UTC
If you have SeparateHoldings enabled and item-level local cover images on the items which appear under the "Other holdings" tab, these covers will not load.

Line 1154 of detail.tt:

if( $(coverSlide).find(".cover-image:visible").length < 1 ){

This doesn't consider the possibility of correctly-loaded cover image under a hidden tab. Removing the ":visible" seems to fix it.
Comment 1 Jonathan Druart 2022-05-18 07:22:13 UTC
That seems to work for me.

I think the :visible was for the OPAC, where we had services that hide the div when no images were there.

We should keep in mind that is code is the same one that is used for the biblio images, and so there are much more use cases to test (turning on the different cover services).

We could apply the same change at the OPAC, to not have the code diverge between the two interfaces, but then it's even harder to test.
Comment 2 Jonathan Druart 2022-06-08 12:37:07 UTC

*** This bug has been marked as a duplicate of bug 30234 ***