From 4dadc092a97cb1e419ef380eeb0fb7c6ce00bf92 Mon Sep 17 00:00:00 2001 From: Hammat Wele Date: Tue, 16 Sep 2025 20:33:26 +0000 Subject: [PATCH] Bug 40822: Custom cover images not displayed in search results When using OPACCustomCoverImages, the custom cover image shows correctly on the bibliographic detail page but does not appear in the search results list. To Test: 1. Disable all cover image preferences (OPACLocalCoverImages, OPACAmazonCoverImages, SyndeticsCoverImages, GoogleJackets OpenLibraryCovers, BakerTaylorEnabled, OPACCoce). 2. Enable OPACCustomCoverImages. 3. Set CustomCoverImagesURL to {956}. 4. Ensure field 956 is visible in the record editor. 1. Go to Administration --> MARC bibliographic framework. 2. Click Actions --> MARC Structure for the default framework. 3. Search for field 956. 4. Click Actions --> Edit subfields. 5. Open the u subfield tab. 6. Make sure the subfield is in tab 9. 7. Check OPAC, Intranet, and Editor. 8. Click Save changes. 5. In a bibliographic record, add the following URL to 956: https://m.media-amazon.com/images/I/71Uo7Fqbu3L.jpg 6. At the OPAC, perform a search to display the record in a results list. --> The custom cover image does not appear in the search results list. 7. Apply the patch 8. Repeat step 6 --> The custom cover image appears in the search results. Signed-off-by: Owen Leonard --- koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt index 96eae27072f..4034eb9633c 100644 --- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt +++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt @@ -24,9 +24,9 @@ [% SET OpenLibraryCovers = Koha.Preference('OpenLibraryCovers') %] [% SET BakerTaylorEnabled = Koha.Preference('BakerTaylorEnabled') %] [% SET OPACCoce = ( Koha.Preference('OPACCoce') && Koha.Preference('CoceProviders') ) %] +[% SET OPACCustomCoverImages = ( Koha.Preference('OPACCustomCoverImages') && Koha.Preference('CustomCoverImagesURL') ) %] [% IF ( CoverImagePlugins || OPACLocalCoverImages || OPACAmazonCoverImages || SyndeticsCoverImages || GoogleJackets || OpenLibraryCovers || BakerTaylorEnabled || OPACCoce || OPACCustomCoverImages ) %] [% SET CoverImages = 1 %] - [% SET OPACCustomCoverImages = ( Koha.Preference('OPACCustomCoverImages') && Koha.Preference('CustomCoverImagesURL') ) %] [% SET OverDriveEnabled = Koha.Preference('OverDriveLibraryID') && Koha.Preference('OverDriveClientKey') && Koha.Preference('OverDriveClientSecret') %] [% END %] [% SET OverDriveEnabled = ( Koha.Preference( "OPACOverDrive" ) && Koha.Preference('OverDriveLibraryID') && Koha.Preference('OverDriveClientKey') && Koha.Preference('OverDriveClientSecret') ) %] -- 2.39.5