Bug 22735 - Broken MARC and ISBD views
Summary: Broken MARC and ISBD views
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: master
Hardware: All All
: P5 - low major (vote)
Assignee: Marcel de Rooy
QA Contact: Testopia
URL:
Keywords:
Depends on: 17530
Blocks:
  Show dependency treegraph
 
Reported: 2019-04-18 09:17 UTC by Katrin Fischer
Modified: 2019-10-14 20:02 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:
19.05.00, 18.11.05


Attachments
Bug 22735: Resolve internal server error on missing item type (1.95 KB, patch)
2019-04-19 07:18 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 22735: Resolve internal server error on missing item type (2.15 KB, patch)
2019-04-19 07:50 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 22735: Resolve internal server error on missing item type (2.18 KB, patch)
2019-04-19 07:50 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 22735: Resolve internal server error on missing item type (2.14 KB, patch)
2019-04-22 11:50 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 22735: Resolve internal server error on missing item type (2.21 KB, patch)
2019-04-23 22:18 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2019-04-18 09:17:41 UTC
For some records the MARC view and ISBD views show an internal server error. The plack error log gives us:

Can't call method "may_article_request" on an undefined value at /usr/share/koha
/opac/cgi-bin/opac/opac-MARCdetail.pl line 354.

Not sure yet if this depends on configuration, but this might already give a good clue.

End user side, so setting to major.
Comment 1 Owen Leonard 2019-04-18 11:56:22 UTC
Looks like it happens if the bibliographic record doesn't have an item type defined.
Comment 2 Katrin Fischer 2019-04-18 11:59:02 UTC
Thx, Owen, that woudl explain it. We never set that, because of our union catalog setup (no way to save 942 from being overwritten). 

Wondering why it doesn't happen on the nrmal detail page? A missing check somewhere?
Comment 3 Owen Leonard 2019-04-18 14:40:47 UTC
Bug 17530 added these can_article_request checks, but did so differently in opac-ISBD.pl and opac-MARCdetail.pl compared to opac-detail.pl. I don't know if it was intentional. Perhaps Marcel can give us some feedback.
Comment 4 Marcel de Rooy 2019-04-19 05:35:43 UTC Comment hidden (obsolete)
Comment 5 Marcel de Rooy 2019-04-19 07:18:54 UTC Comment hidden (obsolete)
Comment 6 Marcel de Rooy 2019-04-19 07:46:26 UTC Comment hidden (obsolete)
Comment 7 Marcel de Rooy 2019-04-19 07:50:23 UTC Comment hidden (obsolete)
Comment 8 Marcel de Rooy 2019-04-19 07:50:56 UTC
Created attachment 88336 [details] [review]
Bug 22735: Resolve internal server error on missing item type

Trivial fix, similar to opac-detail, applied to ISBD and MARC detail.

Test plan:
Enable ArticleRequests pref.
Make sure you have a biblio with no item type in 942c. (Perhaps you need to
make 942c not mandatory temporarily and save a biblio record without this
field being filled.)
If you are logged in, log out.
Go to MARC or ISBD detail page. No crash anymore?

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 9 Owen Leonard 2019-04-22 11:50:21 UTC
Created attachment 88370 [details] [review]
Bug 22735: Resolve internal server error on missing item type

Trivial fix, similar to opac-detail, applied to ISBD and MARC detail.

Test plan:
Enable ArticleRequests pref.
Make sure you have a biblio with no item type in 942c. (Perhaps you need to
make 942c not mandatory temporarily and save a biblio record without this
field being filled.)
If you are logged in, log out.
Go to MARC or ISBD detail page. No crash anymore?

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 10 Katrin Fischer 2019-04-23 22:18:26 UTC
Created attachment 88573 [details] [review]
Bug 22735: Resolve internal server error on missing item type

Trivial fix, similar to opac-detail, applied to ISBD and MARC detail.

Test plan:
Enable ArticleRequests pref.
Make sure you have a biblio with no item type in 942c. (Perhaps you need to
make 942c not mandatory temporarily and save a biblio record without this
field being filled.)
If you are logged in, log out.
Go to MARC or ISBD detail page. No crash anymore?

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 11 Katrin Fischer 2019-04-23 22:18:40 UTC
Thx Marcel and Owen!
Comment 12 Nick Clemens 2019-04-24 11:48:56 UTC
Awesome work all!

Pushed to master for 19.05
Comment 13 Martin Renvoize 2019-04-26 14:48:20 UTC
Pushed to 18.11.x for 18.11.05
Comment 14 Lucas Gass 2019-05-14 22:25:53 UTC
backported to 18.05.x for 18.05.13