Bug 41905

Summary: Local cover images are not displayed in the OPAC public list page (opac-shelves.pl)
Product: Koha Reporter: Sunil Kumar <sunil.kumar>
Component: OPACAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low    
Version: 25.05   
Hardware: All   
OS: All   
GIT URL: Initiative type: ---
Sponsorship status: --- Comma delimited list of Sponsors:
Crowdfunding goal: 0 Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Sunil Kumar 2026-02-21 07:12:39 UTC
When viewing a public list in OPAC (opac-shelves.pl), cover images
are displayed using a lightbox/slider mechanism. Cover images are
loaded based on enabled system preferences,for e.g. including:
- OPACAmazonCoverImages
- GoogleJackets
- OpenLibraryCovers
- LocalCoverImages

All available cover sources should be included in the lightbox
slider.

Issue:
Local cover images are not included in the OPAC list page
lightbox slider, regardless of whether external cover images
(Amazon, Google, OpenLibrary) are available.

Observed behavior:
Scenario A – External cover images available:
1. A bibliographic record has a cover image available from Amazon,
   Google, or OpenLibrary.
2. A local cover image is also uploaded for the same record.
3. On OPAC search results and bibliographic detail pages, the
   local cover displays correctly.
4. On the OPAC public list page (opac-shelves.pl), the lightbox
   slider displays only external cover images.
5. The local cover image is not included in the slider.

Scenario B – No external cover images available:
1. A bibliographic record has no cover image available from Amazon,
   Google, or OpenLibrary.
2. A local cover image is uploaded for the record.
3. On OPAC search results and bibliographic detail pages, the
   local cover displays correctly.
4. On the OPAC public list page (opac-shelves.pl), no cover image
   is displayed.
5. The local cover image is not shown.

Apply the Patch:
The attached patch modifies opac/opac-shelves.pl to ensure that
local cover images are correctly included in the cover image
rendering logic for the OPAC list page.

Test Plan:
1. Enable the following system preferences:
   - OPACAmazonCoverImages
   - GoogleJackets
   - OpenLibraryCovers
   - LocalCoverImages

2. Create a public list and add bibliographic records.

3. Scenario A:
   a. Select a record with an available external cover image.
   b. Upload a local cover image for the same record.
   c. View the public list in OPAC.
   d. Confirm the local cover image appears in the lightbox slider.

4. Scenario B:
   a. Select a record with no external cover images available.
   b. Upload a local cover image.
   c. View the public list in OPAC.
   d. Confirm the local cover image is displayed.

5. Verify that:
   - OPAC search results & bibliographic detail pages continue to display covers correctly.
   - No regressions occur in cover image rendering.
Comment 1 Sunil Kumar 2026-02-21 07:23:13 UTC
The issue reported in this bug has been re-verified.

After further testing, I confirmed that the problem occurs in Koha 25.05.06. However, in the latest development version, the issue is already resolved. The fix is present in the current version of opac/opac-shelves.pl.

Since the behavior has already been corrected in the latest codebase, no additional patch is required.

Marking this bug as RESOLVED – FIXED.