[Bug 34694] New: OPAC bib record blows up with error 500
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34694 Bug ID: 34694 Summary: OPAC bib record blows up with error 500 Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: critical Priority: P5 - low Component: OPAC Assignee: oleonard@myacpl.org Reporter: pedro.amorim@ptfs-europe.com QA Contact: testopia@bugs.koha-community.org CC: jonathan.druart+koha@gmail.com, katrin.fischer@bsz-bw.de, lucas@bywatersolutions.com, m.de.rooy@rijksmuseum.nl, martin.renvoize@ptfs-europe.com, nick@bywatersolutions.com, tomascohen@gmail.com Depends on: 30846 To reproduce, on k-t-d: - Go to circulation rules and set On shelf holds allowed to If all unavailable - Log out - Visit a bib record on OPAC: http://localhost:8080/cgi-bin/koha/opac-detail.pl?biblionumber=76 - Notice it blows up with error 500 Can't call method "id" on an undefined value at /kohadevbox/koha/C4/Reserves.pm line 1385 I believe this was caused by bug 30846. $patron is undefined at that point in the code. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30846 [Bug 30846] "If any unavailable" doesn't consider negative notforloan values as unavailable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34694 Pedro Amorim <pedro.amorim@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34694 --- Comment #1 from Pedro Amorim <pedro.amorim@ptfs-europe.com> --- Created attachment 155130 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=155130&action=edit Bug 34694: Only check for IsAvailableForItemLevelRequest if is authenticated - Go to circulation rules and set On shelf holds allowed to If all unavailable - Log out - Visit a bib record on OPAC: http://localhost:8080/cgi-bin/koha/opac-detail.pl?biblionumber=76 - Notice it blows up with error 500 - Apply patch. Repeat -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34694 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|oleonard@myacpl.org |pedro.amorim@ptfs-europe.co | |m -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34694 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34694 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #155130|0 |1 is obsolete| | --- Comment #2 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 155141 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=155141&action=edit Bug 34694: Only check for IsAvailableForItemLevelRequest if is authenticated - Go to circulation rules and set On shelf holds allowed to If all unavailable - Log out - Visit a bib record on OPAC: http://localhost:8080/cgi-bin/koha/opac-detail.pl?biblionumber=76 - Notice it blows up with error 500 - Apply patch. Repeat Signed-off-by: Owen Leonard <oleonard@myacpl.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34694 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34694 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #155141|0 |1 is obsolete| | --- Comment #3 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 155151 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=155151&action=edit Bug 34694: Only check for IsAvailableForItemLevelRequest if is authenticated - Go to circulation rules and set On shelf holds allowed to If all unavailable - Log out - Visit a bib record on OPAC: http://localhost:8080/cgi-bin/koha/opac-detail.pl?biblionumber=76 - Notice it blows up with error 500 - Apply patch. Repeat Signed-off-by: Owen Leonard <oleonard@myacpl.org> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34694 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |23.11.00 released in| | Status|Passed QA |Pushed to master -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34694 --- Comment #4 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Pushed to master for 23.11. Nice work everyone, thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34694 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |additional_work_needed CC| |fridolin.somers@biblibre.co | |m --- Comment #5 from Fridolin Somers <fridolin.somers@biblibre.com> --- Ah, Bug 30846 also impacted opac/opac-ISBDdetail.pl and opac/opac-MARCdetail.pl And isn't is better to use 'and' instead of '&&' ? https://perldoc.perl.org/perlop#Logical-And Also even if not mandatory in my opinion we should add parenthesis to explain the logic. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34694 Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |emily.lamancusa@montgomeryc | |ountymd.gov --- Comment #6 from Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> --- (In reply to Fridolin Somers from comment #5)
Ah, Bug 30846 also impacted opac/opac-ISBDdetail.pl and opac/opac-MARCdetail.pl
And isn't is better to use 'and' instead of '&&' ? https://perldoc.perl.org/perlop#Logical-And
Also even if not mandatory in my opinion we should add parenthesis to explain the logic.
I think the parentheses WOULD be mandatory if it was switched to 'and', because 'and' has lower precedence than '||'. https://perldoc.perl.org/perlop#Operator-Precedence-and-Associativity Can you explain more about why 'and' would be better in this case? At first I was thinking it was because we want it to short-circuit if $patron is not defined, but looking at the section for '&&', '&&' will also short-circuit, so I'm not clear on what the advantage of 'and' would be. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34694 Aleisha Amohia <aleisha@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |aleisha@catalyst.net.nz --- Comment #7 from Aleisha Amohia <aleisha@catalyst.net.nz> --- (In reply to Tomás Cohen Arazi from comment #4)
Pushed to master for 23.11.
Nice work everyone, thanks!
Awesome! Can this please be backported to 23.05.x :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34694 --- Comment #8 from Aleisha Amohia <aleisha@catalyst.net.nz> --- (In reply to Aleisha Amohia from comment #7)
(In reply to Tomás Cohen Arazi from comment #4)
Pushed to master for 23.11.
Nice work everyone, thanks!
Awesome! Can this please be backported to 23.05.x :)
Sorry and 22.11! In time for the next release -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34694 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|additional_work_needed | --- Comment #9 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Fridolin Somers from comment #5)
Ah, Bug 30846 also impacted opac/opac-ISBDdetail.pl and opac/opac-MARCdetail.pl
This has got a bit confusing. Can you file a separate bug if you think there's a problem? Thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34694 Jonathan Druart <jonathan.druart+koha@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rel_22_11_candidate, | |rel_23_05_candidate -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34694 --- Comment #10 from Fridolin Somers <fridolin.somers@biblibre.com> --- (In reply to Emily Lamancusa from comment #6)
Can you explain more about why 'and' would be better in this case? At first I was thinking it was because we want it to short-circuit if $patron is not defined, but looking at the section for '&&', '&&' will also short-circuit, so I'm not clear on what the advantage of 'and' would be.
Mmm forget that I've done some tests. Indeed && can be used here. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34694 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |34836 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34836 [Bug 34836] OPAC ISBD or MARC view blows up with error 500 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34694 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks|34836 | --- Comment #11 from Fridolin Somers <fridolin.somers@biblibre.com> --- 34836(In reply to Tomás Cohen Arazi from comment #9)
(In reply to Fridolin Somers from comment #5)
Ah, Bug 30846 also impacted opac/opac-ISBDdetail.pl and opac/opac-MARCdetail.pl
This has got a bit confusing. Can you file a separate bug if you think there's a problem? Thanks!
Opened Bug 34836 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34836 [Bug 34836] OPAC ISBD or MARC view blows up with error 500 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34694 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |34836 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34836 [Bug 34836] OPAC ISBD or MARC view blows up with error 500 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34694 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to master |Pushed to stable Version(s)|23.11.00 |23.11.00,23.05.04 released in| | --- Comment #12 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 23.05.x for 23.05.04 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34694 --- Comment #13 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- This causes a regression actually.. you can no longer start a reservation prior to login. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34694 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |34886 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34886 [Bug 34886] Regression in when reservation button appears -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34694 Michaela Sieber <michaela.sieber@kit.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |clemens.tubach@kit.edu, | |michaela.sieber@kit.edu -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34694 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |release-notes-needed -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34694 --- Comment #14 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Martin Renvoize from comment #13)
This causes a regression actually.. you can no longer start a reservation prior to login.
We agree that this is a regression and a big behavior change for a bugfix release. We have worked on 2 alternative solutions: If the user is not logged in Option A: always. When the user clicks on the link they will be asked to log in and will receive feedback on the possibility of the action. Option B: show the link if there are items that are * not of an item type that is set to 'not for loan' in the itemtypes administration * don't have a positive not for loan status The second would be preferred, but I think the first would already be less of a regression than what we see now. Right now you can have a 'place hold' link in the results list, to find it gone in the detail page - that is a bad UX experience. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34694 Magnus Enger <magnus@libriotech.no> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |magnus@libriotech.no --- Comment #15 from Magnus Enger <magnus@libriotech.no> --- The bug is present in 22.11.10 and I can confirm this patch fixes it. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34694 Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Pushed to oldstable Version(s)|23.11.00,23.05.04 |23.11.00,23.05.04,22.11.11 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34694 --- Comment #16 from Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com> --- Nice work everyone! Pushed to oldstable for 22.11.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=34694 Lisette Scheer <lisette@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|release-notes-needed | -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org