Bug 28478 - MARC detail and ISBD pages still show suppressed records
Summary: MARC detail and ISBD pages still show suppressed records
Status: NEW
Alias: None
Product: Koha
Classification: Unclassified
Component: MARC Bibliographic data support (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low major (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on: 10195
Blocks:
  Show dependency treegraph
 
Reported: 2021-05-28 07:11 UTC by Katrin Fischer
Modified: 2022-01-25 18:48 UTC (History)
1 user (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 Katrin Fischer 2021-05-28 07:11:49 UTC
I couldn't verify on master yet, but tested on 20.11.05:

When a record is suppressed in the catalog using 942$n=1 and OpacSuppression a direct link to the MARCdetail page will still work:

/cgi-bin/koha/opac-MARCdetail.pl?biblionumber=x

This is problematic as some search bots could still index the records and someone clever would also be able to guess it.

I think we need to add checks for suppression on these pages and redirect according to OpacSuppressionRedirect.
Comment 1 Fridolin Somers 2021-12-08 21:35:17 UTC
Arf indeed, code in only in opac-detail.pl :

https://git.koha-community.org/Koha-community/Koha/src/commit/3ba74940ee730e92ad7061f27f18390cc6308364/opac/opac-detail.pl#L147

This needs to be in a module, and if possible with a Koha to MARC mapping instead of hardcoded 942$n.
Comment 2 Katrin Fischer 2021-12-12 17:17:06 UTC
(In reply to Fridolin Somers from comment #1)
> Arf indeed, code in only in opac-detail.pl :
> 
> https://git.koha-community.org/Koha-community/Koha/src/commit/
> 3ba74940ee730e92ad7061f27f18390cc6308364/opac/opac-detail.pl#L147
> 
> This needs to be in a module, and if possible with a Koha to MARC mapping
> instead of hardcoded 942$n.

I think adding a Koha to MARC mapping could be a different bug, also to keep this as easy as possible for backporting.

Possibly the code for the check should also be in a routine somewhere?

For MARC21 942$n has been established as standard and has a matching index. I am not sure if UNIMARC has a standard mapping at the moment?
Comment 3 Fridolin Somers 2021-12-14 02:37:51 UTC
(In reply to Katrin Fischer from comment #2)
> (In reply to Fridolin Somers from comment #1)
> > Arf indeed, code in only in opac-detail.pl :
> > 
> > https://git.koha-community.org/Koha-community/Koha/src/commit/
> > 3ba74940ee730e92ad7061f27f18390cc6308364/opac/opac-detail.pl#L147
> > 
> > This needs to be in a module, and if possible with a Koha to MARC mapping
> > instead of hardcoded 942$n.
> 
> I think adding a Koha to MARC mapping could be a different bug, also to keep
> this as easy as possible for backporting.
> 
Sure.
Comment 4 Fridolin Somers 2021-12-14 02:42:10 UTC
Should we add to Koha::Biblio hidden_in_opac() ?
Maybe with a param 'context' = 'search' or 'details' ?