Koha/t
Jonathan Druart 1ea55acd0c 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@theke.io>

Signed-off-by: Josef Moravec <josef.moravec@gmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-12-21 10:07:48 +01:00
..
Acquisition Bug 26384: Fix executable flags 2020-09-11 09:56:56 +02:00
Biblio Bug 26384: Fix executable flags 2020-09-11 09:56:56 +02:00
Budgets Bug 26384: Fix executable flags 2020-09-11 09:56:56 +02:00
Circulation Bug 26384: Fix executable flags 2020-09-11 09:56:56 +02:00
db_dependent Bug 26921: Don't generate an invalid custom cover image if the url cannot be generated 2020-12-21 10:07:48 +01:00
edi_testfiles
etc Bug 26384: Fix executable flags 2020-09-11 09:56:56 +02:00
External
Koha Bug 24786: Fix Script_cron.t and t/Koha/Script.t 2020-11-06 17:04:31 +01:00
lib Bug 26986: Prevent Selenium's StaleElementReferenceException 2020-11-17 12:05:37 +01:00
Members Bug 26384: Fix executable flags 2020-09-11 09:56:56 +02:00
Number Bug 26384: Fix executable flags 2020-09-11 09:56:56 +02:00
Search Bug 12430: Add unit tests for C4::Search::buildQuery 2020-12-04 15:32:11 +01:00
Serials Bug 26384: Fix executable flags 2020-09-11 09:56:56 +02:00
SIP
Test Bug 26384: Fix executable flags 2020-09-11 09:56:56 +02:00
00-checkdatabase-version.t Bug 26384: Fix executable flags 2020-09-11 09:56:56 +02:00
00-deprecated.t
00-load.t Bug 26384: Fix executable flags 2020-09-11 09:56:56 +02:00
00-merge-conflict-markers.t Bug 26384: Fix executable flags 2020-09-11 09:56:56 +02:00
00-testcritic.t Bug 21395: Make perlcritic happy 2020-06-29 12:37:02 +02:00
00-valid-xml.t Bug 26384: Fix executable flags 2020-09-11 09:56:56 +02:00
Auth.t Bug 26384: Fix executable flags 2020-09-11 09:56:56 +02:00
Auth_with_shibboleth.t Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
AuthoritiesMarc_MARC21.t
AuthoritiesMarc_UNIMARC.t
Barcodes_annual.t Bug 5327: More basic unit tests for C4 modules 2010-11-01 15:35:50 +13:00
Barcodes_EAN13.t
Barcodes_hbyymmincr.t
Barcodes_incremental.t
Biblio.t Bug 26133: Remove GetMarcHosts 2020-08-05 17:36:28 +02:00
Biblio2.t Bug 26384: Fix executable flags 2020-09-11 09:56:56 +02:00
Boolean.t Bug 18292: Remove return 1 statements in tests 2017-08-15 12:17:42 -03:00
Budgets.t C4::Bookfund no longer exists, removing the test 2009-12-20 14:31:37 +01:00
Calendar.t Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
Charset.t
Circulation_barcodedecode.t Bug 26384: Fix executable flags 2020-09-11 09:56:56 +02:00
ClassSortRoutine.t Bug 5327: Add basic unit tests to some C4 modules 2010-10-30 20:12:53 +13:00
ClassSortRoutine_Dewey.t
ClassSortRoutine_Generic.t
ClassSortRoutine_LCC.t bug 6281: introduce LC::CallNumber::LC for sorting LC call numbers 2013-06-10 07:56:53 -07:00
ClassSource.t
Context.t Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
Contract.t
Creators.t
DateUtils.t Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
Debug.t
dummy.t Bug 21395: Make perlcritic happy 2020-06-29 12:37:02 +02:00
Edifact.t Bug 18267: (QA follow-up) fix typo: overriden => overridden 2020-11-24 09:52:36 +01:00
EdiInvoice.t Bug 18267: Refactored Edifact Price Calculations 2020-11-16 13:46:48 +01:00
Ediorder.t Bug 23926: Limit GIR segment to 5 pieces of info 2020-03-10 15:18:22 +00:00
Ediordrsp.t
EdiTransport.t Bug 26384: Fix executable flags 2020-09-11 09:56:56 +02:00
Form_MessagingPreferences.t
HtmlTags.t
ImportBatch.t Bug 26384: Fix executable flags 2020-09-11 09:56:56 +02:00
Installer_PerlModules.t
Installer_pm.t Bug 19735: Move Perl deps definitions into a cpanfile 2020-02-12 16:33:02 +00:00
ItemCirculationAlertPreference.t
Koha.t
Koha_MetadataRecord.t Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
Koha_SearchEngine_Elasticsearch_Browse.t Bug 24545: Fix newly added files 2020-02-24 13:31:27 +00:00
Koha_Template_Plugin_Cache.t Bug 26384: Fix executable flags 2020-09-11 09:56:56 +02:00
Koha_Template_Plugin_Koha.t Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
Koha_Util_FrameworkPlugin.t
Koha_Util_MARC.t
Labels.t Bug 26384: Fix executable flags 2020-09-11 09:56:56 +02:00
Labels_split_ccn.t
Labels_split_ddcn.t Bug 15836: Add the ability to defined custom methods to split call number in labels 2018-11-13 15:18:22 +00:00
Labels_split_lccn.t Bug 15836: Add the ability to defined custom methods to split call number in labels 2018-11-13 15:18:22 +00:00
Labels_split_Regex.t Bug 15836: Add the ability to defined custom methods to split call number in labels 2018-11-13 15:18:22 +00:00
Languages.t Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
Letters.t Bug 18292: Remove return 1 statements in tests 2017-08-15 12:17:42 -03:00
Logger.t Bug 26384: Fix executable flags 2020-09-11 09:56:56 +02:00
Makefile.t Bug 26384: Fix executable flags 2020-09-11 09:56:56 +02:00
Matcher.t Bug 23324: Add an ISBN normalization routine 2019-08-16 12:26:48 +01:00
Members_Messaging.t
OpenLibrarySearch.t Bug 26384: Fix executable flags 2020-09-11 09:56:56 +02:00
Output.t Bug 24369: Add CORS support to output_with_http_headers() 2020-03-05 12:59:44 +00:00
Output_JSONStream.t Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
Patron.t Bug 14570: Make it possible to add multiple guarantors to a record 2019-08-20 16:04:48 +01:00
Patroncards.t
Patroncards_Batch.t
Patroncards_Lib.t
Patroncards_Patroncard.t
Patroncards_Profile.t Bug 5327: More basic unit tests for C4 modules 2010-11-01 15:35:50 +13:00
Patroncards_Template.t
Prices.t Bug 26384: Fix executable flags 2020-09-11 09:56:56 +02:00
RecordProcessor.t Bug 25008: Tests for ->options 2020-04-14 08:31:22 +01:00
Ris.t
Scheduler.t Bug 26384: Fix executable flags 2020-09-11 09:56:56 +02:00
Scrubber.t Bug 14116: Silence noisy output for t/Scrubber. 2015-06-01 14:10:56 -03:00
Search.t Bug 18292: Remove return 1 statements in tests 2017-08-15 12:17:42 -03:00
Search_PazPar2.t
SimpleMARC.t Bug 26781: Check for subfield defined rather than truth 2020-10-26 00:14:41 +01:00
SMS.t Bug 18292: Remove return 1 statements in tests 2017-08-15 12:17:42 -03:00
SocialData.t Bug 26384: Fix executable flags 2020-09-11 09:56:56 +02:00
Stats.t
SuggestionEngine.t Bug 21395: Make perlcritic happy 2020-06-29 12:37:02 +02:00
SuggestionEngine_AuthorityFile.t Bug 25898: Prohibit indirect object notation 2020-10-15 12:56:30 +02:00
template_filters.t Bug 26384: Fix executable flags 2020-09-11 09:56:56 +02:00
timezones.t Bug 26384: Fix executable flags 2020-09-11 09:56:56 +02:00
TmplToken.t Bug 5327 added unit tests for C4/TmplToken.pm 2012-01-31 17:21:50 +01:00
Token.t Bug 26384: Fix executable flags 2020-09-11 09:56:56 +02:00
XSLT.t Bug 18292: Remove return 1 statements in tests 2017-08-15 12:17:42 -03:00