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 <roman.dolny@jezuici.pl>
Signed-off-by: Laura_Escamilla <laura.escamilla@bywatersolutions.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
(cherry picked from commit 1838b1c4a0)
Signed-off-by: Jacob O'Mara <Jacob.omara@openfifth.co.uk>
This commit is contained in:
Hammat Wele 2026-01-17 00:38:28 +00:00 committed by Jacob O'Mara
parent 952862591c
commit 7ecb5566c8
No known key found for this signature in database
1 changed files with 5 additions and 0 deletions

View File

@ -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;
}