[Koha-bugs] [Bug 31207] The OPAC Shelf browser fails to display local cover images

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Jul 21 05:29:05 CEST 2022


https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31207

Andreas Roussos <a.roussos at dataly.gr> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://bugs.koha-community
                   |                            |.org/bugzilla3/show_bug.cgi
                   |                            |?id=28180

--- Comment #3 from Andreas Roussos <a.roussos at dataly.gr> ---
With regards to the display of local cover images, the OPAC Shelf
browser works correctly in Koha versions < 21.11.00. It's also worth
noting that the correct Shelf browser behaviour can be observed in
all Koha versions (including master) when other cover image providers
(Amazon, etc.) are in use (either on their own or in combination with
the local cover images system preferences).

The relevant commit that changed the Shelf browser's behaviour is
fad97080e97da5bc77724c68b9394aba15518847 (from Bug 28180), where
these lines were removed from opac-detail.tt:

[% IF OPACLocalCoverImages %]
    KOHA.LocalCover.GetCoverFromBibnumber(true);
    [% IF itemloop_has_images OR oheritemloop_has_images %]
        KOHA.LocalCover.GetCoverFromItemnumber(true);
    [% END %]
[% END %]

Adding the above code to opac-detail.tt fixes the problem in master.

However, if you look closely you'll notice the code has a small typo.
The template parameter in the second [% IF %] conditional is named:

oheritemloop_has_images

vs. the correct parameter name:

otheritemloop_has_images

Because of that, the display of local cover images in the
OPAC Shelf browser has never worked as intended when the SysPref
OpacSeparateHoldings is set to 'Separate'.

-- 
You are receiving this mail because:
You are watching all bug changes.


More information about the Koha-bugs mailing list