Koha-clms/opac
Fridolin Somers fcca81ad77
Bug 38963: Check for existence of biblio object before fetching cover images in the OPAC
This patch adds a conditional to ensure the biblio object has been retrieved
and assumes no cover images otherwise. This is similar to bug 37425 that
fixed the issue for the staff interface.

Test plan:
 1. Enable the OPACLocalCoverImages system preference.
 2. Search in the OPAC (for example, attic).
 3. Find the biblionumber for one of the results and delete it
    from the database using SQL:
     DELETE FROM biblio WHERE biblionumber=3;
 4. Search again.
    NOTE: Steps 3 and 4 need to be done very quickly to generate the error.
    I had the terminal open with the SQL already loaded, and the browser
    also open.
 5. Error trace generated:
     Can't call method "cover_images" on an undefined value at /kohadevbox/koha/opac/opac-search.pl line 702.
 at /kohadevbox/koha/opac/opac-search.pl line 701
 6. Reindex, confirm error is gone: koha-rebuild-zebra -d -f -v kohadev
 7. Apply the patch.
 8. Repeat steps 2 to 4 - I searched for perl and used biblionumber 13.
 9. No error generated
10. Reindex and repeat search and confirm no error.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: David Cook <dcook@prosentient.com.au>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit ed3481786f)
Signed-off-by: Baptiste Wojtkowski <baptiste.wojtkowski@biblibre.com>
2025-08-06 09:57:01 +00:00
..
clubs
…
errors Bug 37741: Do not send cookie back from error pages 2024-08-30 12:45:45 +02:00
external/overdrive
…
sci Revert "Bug 36586: Define self-checkin timer using Javascript class" 2025-07-31 14:34:37 +02:00
sco Revert "Bug 36586: Define self-checkin timer using Javascript class" 2025-07-31 14:34:37 +02:00
svc Bug 35942: OPAC user can enroll several times to the same club 2024-07-01 18:55:39 +02:00
ilsdi.pl Bug 36867: (follow-up) Don't check IP if ILS-DI disabled 2025-05-23 12:18:30 +02:00
maintenance.pl
…
oai.pl
…
opac-ISBDdetail.pl Bug 28478: Make opac-*detail.pl scripts use Koha::Biblio->opac_suppressed() 2025-02-18 19:17:20 +01:00
opac-MARCdetail.pl Bug 28478: Make opac-*detail.pl scripts use Koha::Biblio->opac_suppressed() 2025-02-18 19:17:20 +01:00
opac-account-pay-return.pl
…
opac-account-pay.pl
…
opac-account.pl
…
opac-addbybiblionumber.pl Bug 35126: Remove onload from opac-addbybiblionumber.pl 2024-11-07 18:49:39 +01:00
opac-alert-subscribe.pl
…
opac-alert-subscriptions.pl
…
opac-article-request-cancel.pl
…
opac-authorities-home.pl Bug 37057: Restore filtering of unused authorities 2024-07-01 18:55:53 +02:00
opac-authoritiesdetail.pl Bug 33907: Improve translation of title tags: OPAC part 1 2024-09-02 12:13:52 +02:00
opac-basket.pl
…
opac-blocked.pl
…
opac-browse.pl
…
opac-browser.pl
…
opac-changelanguage.pl
…
opac-course-details.pl
…
opac-course-reserves.pl
…
opac-curbside-pickups.pl Bug 38813: Make the 'curbside pickups' tab display selected if so 2025-02-04 21:46:04 +01:00
opac-detail.pl Bug 28478: Make opac-*detail.pl scripts use Koha::Biblio->opac_suppressed() 2025-02-18 19:17:20 +01:00
opac-discharge.pl
…
opac-dismiss-message.pl
…
opac-downloadcart.pl Bug 35975: Show biblionumber when download cart as BibTeX 2025-03-19 23:57:49 +01:00
opac-downloadshelf.pl Bug 31224: Update instances of metadata->record 2024-11-07 16:29:23 +01:00
opac-export.pl Bug 31224: Update instances of metadata->record 2024-11-07 16:29:23 +01:00
opac-holdshistory.pl
…
opac-ics.pl
…
opac-idref.pl
…
opac-illrequests.pl Bug 38288: Fallback to Standard if FreeForm 2024-10-31 11:32:57 +01:00
opac-image.pl
…
opac-imageviewer.pl
…
opac-issue-note.pl
…
opac-library.pl Bug 30873: Add system preference to hide libraries link in the OPAC 2024-07-02 17:20:39 +02:00
opac-main.pl
…
opac-memberentry.pl Bug 38974: Fix error in OPAC patron update 2025-07-25 14:02:00 +02:00
opac-messaging.pl
…
opac-modrequest-suspend.pl Bug 37868: Remove C4::Reserves::ToggleSuspend 2024-10-21 15:10:35 +02:00
opac-modrequest.pl
…
opac-mymessages.pl
…
opac-news-rss.pl
…
opac-overdrive-search.pl Bug 37221: Add preference to turn off OPAC Overdrive features 2024-11-11 14:12:14 +01:00
opac-page.pl Bug 36875: Do not pass unsanitized language to $page->translated_content 2024-06-20 17:55:37 +02:00
opac-passwd.pl
…
opac-password-recovery.pl Bug 38772: Typo 'minPasswordPreference' system preference 2025-03-19 23:57:37 +01:00
opac-patron-consent.pl
…
opac-patron-image.pl
…
opac-privacy.pl
…
opac-ratings.pl
…
opac-readingrecord.pl Bug 38102: Fix default sort order 2025-08-01 14:46:04 +02:00
opac-recall.pl
…
opac-recalls.pl
…
opac-registration-verify.pl Bug 37339: Set messaging preferences from default on self registration 2024-07-18 17:53:11 +02:00
opac-renew.pl Bug 36453: Update old occurrences of effective_BlockExpiredPatronOpacActions 2024-06-11 09:17:18 +01:00
opac-reportproblem.pl
…
opac-request-article.pl
…
opac-reserve.pl Bug 36453: Update old occurrences of effective_BlockExpiredPatronOpacActions 2024-06-11 09:17:18 +01:00
opac-reset-password.pl
…
opac-restrictedpage.pl
…
opac-retrieve-file.pl
…
opac-review.pl Bug 13342: Not logged user can place a review/comment 2024-10-18 12:07:53 +02:00
opac-routing-lists.pl
…
opac-search-history.pl
…
opac-search.pl Bug 38963: Check for existence of biblio object before fetching cover images in the OPAC 2025-08-06 09:57:01 +00:00
opac-sendbasket.pl Bug 31224: Update instances of metadata->record 2024-11-07 16:29:23 +01:00
opac-sendshelf.pl Bug 31224: Update instances of metadata->record 2024-11-07 16:29:23 +01:00
opac-serial-issues.pl
…
opac-shareshelf.pl Bug 30955: (follow-up) Merged related notices into lists 2024-10-24 16:55:59 +02:00
opac-shelves.pl Bug 38362: Fix printing lists on opac/opac-shelves.pl 2024-12-12 12:51:58 +01:00
opac-showmarc.pl
…
opac-showreviews.pl
…
opac-suggestions.pl Bug 37152: Aquisitions basket and OPAC suggestion deletion should use the op cud-delete 2024-06-27 11:49:57 +02:00
opac-tags.pl Bug 38969: Prevent JS error when adding tags with quote at the OPAC 2025-04-24 18:42:31 +02:00
opac-tags_subject.pl
…
opac-topissues.pl
…
opac-user.pl Bug 39003: Fix the tab template variable in opac-user.pl 2025-02-04 21:59:51 +01:00
opac-virtual-card.pl Bug 26777: Allow ability to select diffferent barcode types 2024-08-26 17:39:36 +02:00
tracklinks.pl
…
unapi
…