Bug 23225 - OPAC ISBD view returns 404 when no item attached
Summary: OPAC ISBD view returns 404 when no item attached
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: PC Linux
: P5 - low major (vote)
Assignee: Jonathan Druart
QA Contact: Tomás Cohen Arazi
URL:
Keywords:
Depends on: 22696
Blocks:
  Show dependency treegraph
 
Reported: 2019-06-27 10:24 UTC by Luis
Modified: 2020-06-04 20:32 UTC (History)
6 users (show)

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


Attachments
ISBD view. Error 440 (67.25 KB, image/png)
2019-06-27 10:24 UTC, Luis
Details
Bug 23225: Regression tests (1.02 KB, patch)
2019-06-28 18:49 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 23225: Add a test (1.02 KB, patch)
2019-06-28 19:02 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 23225: Do not hide a biblio if there is no item (956 bytes, patch)
2019-06-28 19:02 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 23225: Add a test (1.07 KB, patch)
2019-06-28 19:09 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 23225: Do not hide a biblio if there is no item (1012 bytes, patch)
2019-06-28 19:09 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Luis 2019-06-27 10:24:27 UTC
Created attachment 91047 [details]
ISBD view. Error 440

After installing the new version (19.05), in the OPAC, when we ask for the ISBD view, we get a 440 error. In staff mode, the ISBD view runs correctly.
Comment 1 Katrin Fischer 2019-06-27 10:54:31 UTC
I almost closed this duplicate to bug 22735 - but it seems that shoudl have been in 19.05.
Comment 2 Luis 2019-06-27 10:59:08 UTC
This error only occurs in the ISBD view, not in MARC, and only in the OPAC, not in staff. I have tried the solution that is pointed at 22753, but it does not solve the problem. Thank you
Comment 3 Luis 2019-06-27 11:49:12 UTC
This same problem can be seen in this demo site:
http://koha.adminkuhn.ch

http://koha.adminkuhn.ch:8080/
Comment 4 Jonathan Druart 2019-06-28 00:14:52 UTC
The problem appears when there is no item for the bibliographic record.

Maybe caused by
  commit 4a0fa82a5b3ed2f493c55c1b74bf3dac2738c47f
  Bug 22696: Simplify visibility logic in opac-ISBDdetail.pl
Comment 5 Jonathan Druart 2019-06-28 00:16:46 UTC
The code from opac-MARCdetail.pl, opac-detail.pl and opac-ISBDdetail.pl is different. Hard to see which path we must follow.
Comment 6 Tomás Cohen Arazi 2019-06-28 14:52:30 UTC
(In reply to Jonathan Druart from comment #5)
> The code from opac-MARCdetail.pl, opac-detail.pl and opac-ISBDdetail.pl is
> different. Hard to see which path we must follow.

The code in (In reply to Jonathan Druart from comment #5)
> The code from opac-MARCdetail.pl, opac-detail.pl and opac-ISBDdetail.pl is
> different. Hard to see which path we must follow.

opac-ISBDdetail.pl is the right one. The others are really leaking records that shouldn't exist for the OPAC interface.

A good enhancement could be to consider a behavior based on OpacSuppression for this cases. But as-is there's an inconsistent behavior.
Comment 7 Tomás Cohen Arazi 2019-06-28 18:49:20 UTC Comment hidden (obsolete)
Comment 8 Jonathan Druart 2019-06-28 19:02:28 UTC
Created attachment 91117 [details] [review]
Bug 23225: Add a test
Comment 9 Jonathan Druart 2019-06-28 19:02:32 UTC
Created attachment 91118 [details] [review]
Bug 23225: Do not hide a biblio if there is no item

This patch fixes a 404 redirect from the OPAC ISBD view if the
bibliographic record does not have item attached.
Comment 10 Tomás Cohen Arazi 2019-06-28 19:09:27 UTC
Created attachment 91119 [details] [review]
Bug 23225: Add a test

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 11 Tomás Cohen Arazi 2019-06-28 19:09:31 UTC
Created attachment 91120 [details] [review]
Bug 23225: Do not hide a biblio if there is no item

This patch fixes a 404 redirect from the OPAC ISBD view if the
bibliographic record does not have item attached.

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Comment 12 Luis 2019-06-28 21:25:54 UTC
Thank you. I have modified the Biblio.pl file and it already shows the ISDB view correctly when there are no items.
Comment 13 Martin Renvoize 2019-07-01 15:19:39 UTC
Nice work!

Pushed to master for 19.11.00
Comment 14 Fridolin Somers 2019-07-25 12:02:53 UTC
Pushed to 19.05.x for 19.05.03
Comment 15 Lucas Gass 2019-07-26 14:57:48 UTC
missing dependencies, no backport to 18.11.x