Bug 30186 - ISBD throws error when record is suppressed, but patron category is not in OpacHiddenItemsExceptions
Summary: ISBD throws error when record is suppressed, but patron category is not in Op...
Status: CLOSED INVALID
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: 20.05
Hardware: All All
: P5 - low major (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-02-26 06:07 UTC by Charles Kelley
Modified: 2022-12-12 21:24 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Charles Kelley 2022-02-26 06:07:36 UTC
We encountered an ISBD view problem: The file turns up lost. Here are
the conditions that we have identified:

 - In OPACHiddenItemsExceptions, the patron type is not listed as an excepted type.
 - The patron looks for a work in our collection through our catalog, but 942‡n = "1".
 - Method of search does not matter: author, title, subject, word, call number all work fine.
 - The record is listed in the OPAC results.
 - The patron happens to select the version whose 942‡n = "1". The record, in Normal view, is rendered in the window. All three view tabs (Normal view, MARC view, ISBD view) are listed.
 - The patron clicks on ISBD view. BOOM!

Here's the output from Koha.

------------

Software error:

The method Koha::Item->lost is not covered by tests!

Trace begun at /usr/share/koha/lib/Koha/Object.pm line 780
Koha::Object::AUTOLOAD('Koha::Item=HASH(0x5637bb245f10)') called at
/usr/share/koha/lib/Koha/Item.pm line 478
Koha::Item::__ANON__ at /usr/share/koha/lib/Koha/Item.pm line 478
Koha::Item::hidden_in_opac('Koha::Item=HASH(0x5637bb245f10)',
'HASH(0x5637bb191908)') called at /usr/share/koha/lib/Koha/Biblio.pm line
258
Koha::Biblio::__ANON__ at /usr/share/koha/lib/Koha/Biblio.pm line 258
Koha::Biblio::hidden_in_opac('Koha::Biblio=HASH(0x5637ba6cbfd0)',
'HASH(0x5637bb2460a8)') called at
/usr/share/koha/opac/cgi-bin/opac/opac-ISBDdetail.pl line 91

For help, please send mail to the webmaster ([no address given]), giving
this error message and the time and date of the error.

------------

Clicking on MARC view or Normal view does not render the above bug.
Pressing the back arrow restores the record's listing and all other OPAC
features. If we change the patron's type to one in
OPACHiddenItemsException, or if add the patron's type to
OPACHiddenItemsException, the ISBD bug vanishes in subsequent searches for
the work that produced the error after the changes propagate through Koha.
Comment 1 Katrin Fischer 2022-02-26 15:12:46 UTC
I wonder about your step by step:

 - Method of search does not matter: author, title, subject, word, call number all work fine.
 - The record is listed in the OPAC results.

OpacHiddenItemsExceptions has nothing to do with OpacSuppression (942$n), both are unrelated methods to hide records.

Also: if the record has been successfully suppressed (OpacSuppression turned on) and indexed correctly, it should not show up in the result list in first place?
Comment 2 Fridolin Somers 2022-03-01 22:08:16 UTC
Looks like the preference OpacHiddenItems contains 'lost' instead of 'itemlost'.
Fields must be the column names of items DB table.

See https://wiki.koha-community.org/wiki/OpacHiddenItems
Comment 3 Tomás Cohen Arazi 2022-05-11 12:24:54 UTC
(In reply to Fridolin Somers from comment #2)
> Looks like the preference OpacHiddenItems contains 'lost' instead of
> 'itemlost'.
> Fields must be the column names of items DB table.
> 
> See https://wiki.koha-community.org/wiki/OpacHiddenItems

Agreed.
Comment 4 Charles Kelley 2022-05-16 02:03:44 UTC
Acknowledged. My mistake.

Where are the column names listed? Are column names listed in the schema?
Comment 5 Fridolin Somers 2022-05-16 20:55:52 UTC
(In reply to Charles Kelley from comment #4)
> Where are the column names listed? Are column names listed in the schema?
Here there are :
for example Koha 21.11 :
https://schema.koha-community.org/21_11/tables/items.html
Comment 6 Charles Kelley 2022-05-16 22:56:13 UTC
Thank you, all.