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

David Cook <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #177136|0                           |1
        is obsolete|                            |

--- Comment #8 from David Cook <[email protected]> ---
Created attachment 177207
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=177207&action=edit
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 <[email protected]>
Signed-off-by: David Cook <[email protected]>

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to