Bug 27685 - Syspref OpacSuppression has no effect on the bibliographic detail page
Summary: Syspref OpacSuppression has no effect on the bibliographic detail page
Status: CLOSED WORKSFORME
Alias: None
Product: Koha
Classification: Unclassified
Component: Searching (show other bugs)
Version: Main
Hardware: All All
: P5 - low major
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on: 10195
Blocks:
  Show dependency treegraph
 
Reported: 2021-02-11 15:12 UTC by Koha Team University Lyon 3
Modified: 2023-06-08 22:26 UTC (History)
4 users (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Koha Team University Lyon 3 2021-02-11 15:12:52 UTC
This syspref is enabled on our install and was working until last update to 19.11 a priori.
We add a 099 tag to the notices without items and our zebra config is like this :

  <!-- 099$o Suppress -->
  <index_subfields tag="099" subfields="o">
    <target_index>Suppress:w</target_index>
    <target_index>Suppress:n</target_index>
  </index_subfields>

Seems that in 19.11, the Suppress field is hard coded to 942 tag
ttps://git.koha-community.org/Koha-community/Koha/src/branch/19.11.x/opac/opac-detail.pl#L118

Olivier Crouzet
Comment 1 Katrin Fischer 2021-02-12 12:46:15 UTC
Hi, I believe this comes from MARC21 which is much more standardized than UNIMARC at this point. I am not sure if we would not even need a new preference to be able to tell what people have set their suppress index to :(

What is the problem you see? Search should still be blocked, is it possible to go to the detail page by link directly?
Comment 2 Koha Team University Lyon 3 2021-02-12 14:22:53 UTC
Yes you can display the detail page only with the direct link on the biblionumber (opac-detail.pl?biblionumber=nnnn). To be honest there is little chance that it could be used like this except if it had been kept previously in a list but never know.
Comment 3 David Cook 2022-06-23 23:52:30 UTC
I've been thinking it would be good to have a "suppressed" or "hidden" column in the "biblio" table... it would help prevent this sort of situation I reckon.
Comment 4 Jonathan Druart 2022-06-24 05:57:21 UTC
Might be fixed by bug 27272.
Comment 5 Jonathan Druart 2022-06-24 05:58:52 UTC
(In reply to Jonathan Druart from comment #4)
> Might be fixed by bug 27272.

Hum, forget that, it won't.
Comment 6 Katrin Fischer 2022-06-24 09:21:38 UTC
I think it's a bug and a regression. 

The direct link by biblionumber should not work - and it didn't in the past. 

How a direct link behaves, is supposed to be controlled by the OpacSuppressionRedirect system preference. There is something broken here.
Comment 7 Katrin Fischer 2022-06-24 09:21:57 UTC
Updating severity.
Comment 8 David Cook 2022-06-27 00:22:33 UTC
(In reply to Katrin Fischer from comment #6)
> I think it's a bug and a regression. 
> 
> The direct link by biblionumber should not work - and it didn't in the past. 
> 
> How a direct link behaves, is supposed to be controlled by the
> OpacSuppressionRedirect system preference. There is something broken here.

Do we know which version introduced the regression?
Comment 9 Katrin Fischer 2022-06-27 07:39:23 UTC
Sadly it looks like it was a while ago already, I have been seeing the issue on 20.11 in testing.
Comment 10 David Cook 2022-06-27 23:15:50 UTC
(In reply to Katrin Fischer from comment #6)
> I think it's a bug and a regression. 
> 
> The direct link by biblionumber should not work - and it didn't in the past. 
> 
> How a direct link behaves, is supposed to be controlled by the
> OpacSuppressionRedirect system preference. There is something broken here.

Could the exact problem be detailed?

Using koha-testing-docker, I turned on OpacSuppression, updated 942$n for bib 29, and now when I go to http://localhost:8080/cgi-bin/koha/opac-detail.pl?biblionumber=29 it redirects me to http://localhost:8080/cgi-bin/koha/opac-blocked.pl 

I updated to OpacSuppressionRedirect to use a 404 instead and that's working too.

So this might already be fixed in master?
Comment 11 Katrin Fischer 2022-06-28 09:45:02 UTC
Hm, it could be. I am seeing the issue in 20.11. It would be great if we could limit it down a bit more.
Comment 12 Katrin Fischer 2022-06-28 10:24:11 UTC
> Could the exact problem be detailed?

There is not much to detail I think. The record is not turning up in search, but can be accessed by biblionumber link.
Comment 13 Katrin Fischer 2022-07-02 22:41:58 UTC
'In discussion' without any argument is a bit mean :)

Tested with Zebra and Elasticsearch on master: hiding the detail page works correctly in there.

It also appears ok with Zebra in 20.11. 

I cannot check with Elastic and 20.11, but it might not make a difference. 

Lyon 3, can you add more details?
Comment 14 David Cook 2022-07-04 00:21:58 UTC
(In reply to Katrin Fischer from comment #13)
> 'In discussion' without any argument is a bit mean :)
 
I thought it was gentler than marking Resolved Invalid ﷐[U+1F605]﷑
Comment 15 Koha Team University Lyon 3 2022-07-04 15:42:20 UTC
I confirm that the problem seems to be solved (for both Zebra and Elastic Search).

In prod (indexed with Zebra) :
example with biblionumber 3652 wich has the Suppress field enabled (099$0 = 1).
Searching with the terms "Einstein 1905" does not get this title in the results.
Searching for detailed page "https://catalogue.univ-lyon3.fr/cgi-bin/koha/opac-detail.pl?biblionumber=3652" get 404 error.

Same searches on our preprod instance (with Elastic search in test) : same results.

Olivier Crouzet
Comment 16 Katrin Fischer 2022-07-15 18:52:57 UTC
I suspect that my records were not properly indexed, can't replicate either. Closing WORKSFORME. Please reopen if necessary.