Bug 30792

Summary: Item cover images don't load in "Other holdings" tab
Product: Koha Reporter: Owen Leonard <oleonard>
Component: TemplatesAssignee: Owen Leonard <oleonard>
Status: RESOLVED DUPLICATE QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: jonathan.druart, lucas
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 26145    
Bug Blocks:    

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 ***