[Koha-bugs] [Bug 26921] Create cover image even when there is no record identificator

bugzilla-daemon at bugs.koha-community.org bugzilla-daemon at bugs.koha-community.org
Thu Nov 5 19:22:48 CET 2020


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

--- Comment #3 from Tomás Cohen Arazi <tomascohen at gmail.com> ---
Created attachment 113128
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=113128&action=edit
Bug 26921: Don't generate an invalid custom cover image if the url cannot be
generated

In case a custom cover image url is used to generate the cover image of
bibliographic records, we should not build one if the record does not
have the necessary data.

For instance if you have
CustomCoverImagesURL set to https://covers.openlibrary.org/b/isbn/{isbn}-M.jpb
and a biblio does not have the isbn defined, we should not generate and
empty image (empty or invalid src)

Test plan:
0.
Set CustomCoverImagesURL to https://covers.openlibrary.org/b/isbn/{isbn}-M.jpb
Enable CustomCoverImages and OPACCustomCoverImages
To highlight the issue you should disable LocalCoverImages and
OPACLocalCoverImages.
1. Make sure you have some of your bibliographic records with a valid
isbn
2. Make sure you have at least 1 bibliographic record without an isbn
set
3. Visit the search result and detail views (OPAC and staff interfaces)
=> Without this patch you should see a "Cover image" link, and an empty
block/div on the detail page
=> With this patch applied you should only see images when the url can
be generated

Note that the problem will persist if the isbn is not valid (ie. no
image is generated)

Sponsored-by: Orex Digital
Signed-off-by: Tomas Cohen Arazi <tomascohen at theke.io>

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


More information about the Koha-bugs mailing list