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.
Looks like it happens if the bibliographic record doesn't have an item type defined.
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?
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.
Having a look now
Created attachment 88334 [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: Make sure you have a biblio with no item type in 942c. Go to MARC or ISBD detail page. No crash anymore?
Additional test requirements ;) Enable Article Requests. Test MARC or ISBD detail without being logged in. And really make sure there is no 942c in the record. (I removed mandatory in the framework and saved biblio record again.)
Created attachment 88335 [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: 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>
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>
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>
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>
Thx Marcel and Owen!
Awesome work all! Pushed to master for 19.05
Pushed to 18.11.x for 18.11.05
backported to 18.05.x for 18.05.13