From 22167b9ad8928f128a61a6f00fc71f5504b39cdc Mon Sep 17 00:00:00 2001 From: Hammat Wele Date: Sat, 17 Jan 2026 00:38:28 +0000 Subject: [PATCH] Bug 41655: Local OPAC covers are not displayed in OPAC lists Local cover images are no longer displayed in OPAC lists since Bug 41078. In Koha versions prior to 25.05.05, local cover images were correctly displayed in OPAC lists. This appears to be a regression. To reproduce 1. Set the system preferences LocalCoverImages and OPACLocalCoverImages to Show. 2. Find a bibliographic record and open the record detail page. 3. Upload a local cover image file for the record. 4. Create a public list and add the record to the list. 5. In the OPAC, open the public list. --> The local cover image is missing. 6. Apply the patch. 7. Reload the OPAC list page. --> The local cover image is now displayed correctly. Signed-off-by: Roman Dolny --- opac/opac-shelves.pl | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/opac/opac-shelves.pl b/opac/opac-shelves.pl index 1f999d827c..bd908db01e 100755 --- a/opac/opac-shelves.pl +++ b/opac/opac-shelves.pl @@ -459,6 +459,11 @@ if ( $op eq 'view' ) { borrowernumber => $loggedinuser, } ); + + if ( C4::Context->preference('OPACLocalCoverImages') ) { + $this_item->{has_local_cover_image} = + $this_item->{biblio_object} ? $this_item->{biblio_object}->cover_images->count : 0; + } push @items_info, $this_item; } -- 2.39.5