[Bug 17403] New: Internal Server Error while deleting patron
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17403 Bug ID: 17403 Summary: Internal Server Error while deleting patron Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Patrons Assignee: koha-bugs@lists.koha-community.org Reporter: veron@veron.ch QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com To reproduce: - Go to a patron's detail page - Toolbar : More : Delete - Confirm "Are you sure you want to delete..." Result: Internal Server Error Plack error log: exited nonzero: 1 at /home/marc/koha/members/deletemem.pl -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17403 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |veron@veron.ch |ity.org | Priority|P5 - low |P1 - high Version|unspecified |master Severity|enhancement |critical -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17403 --- Comment #1 from Marc Véron <veron@veron.ch> --- Created attachment 56055 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=56055&action=edit Bug 17403: Internal Server Error while deleting patron This patch fixes a Internal Server Error while deleting patrons. To reproduce: - Go to a patron's detail page - Toolbar : More : Delete - Confirm "Are you sure you want to delete..." Result: Internal Server Error Plack error log: exited nonzero: 1 at /home/marc/koha/members/deletemem.pl Note: Patron is deleted To test: - Apply patch - Re-start plack - Try to reproduce steps above (with other patron) Expected result: No Internal Server Error, Redirect to Home > Patrons -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17403 Marc Véron <veron@veron.ch> 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=17403 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #56055|0 |1 is obsolete| | --- Comment #2 from Marc Véron <veron@veron.ch> --- Created attachment 56057 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=56057&action=edit Bug 17403: Internal Server Error while deleting patron This patch fixes a Internal Server Error while deleting patrons. To reproduce: - Go to a patron's detail page - Toolbar : More : Delete - Confirm "Are you sure you want to delete..." Result: Internal Server Error Plack error log: exited nonzero: 1 at /home/marc/koha/members/deletemem.pl Note: Patron is deleted Additional tests: Try to delete yourself, to delete a staff member without having superlibrarian permission etc. To test: - Apply patch - Re-start plack - Try to reproduce steps above (with other patron) Expected result: No Internal Server Error, Redirect to Home > Patrons Amended to include all occurences of 'exit 1' -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17403 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- 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=17403 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #56057|0 |1 is obsolete| | --- Comment #3 from Chris Cormack <chris@bigballofwax.co.nz> --- Created attachment 56067 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=56067&action=edit Bug 17403: Internal Server Error while deleting patron This patch fixes a Internal Server Error while deleting patrons. To reproduce: - Go to a patron's detail page - Toolbar : More : Delete - Confirm "Are you sure you want to delete..." Result: Internal Server Error Plack error log: exited nonzero: 1 at /home/marc/koha/members/deletemem.pl Note: Patron is deleted Additional tests: Try to delete yourself, to delete a staff member without having superlibrarian permission etc. To test: - Apply patch - Re-start plack - Try to reproduce steps above (with other patron) Expected result: No Internal Server Error, Redirect to Home > Patrons Amended to include all occurences of 'exit 1' Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Good catch Marc -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17403 Marc Véron <veron@veron.ch> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |https://bugs.koha-community | |.org/bugzilla3/show_bug.cgi | |?id=17411 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17403 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #4 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- I can't reproduce the problem under Plack - patron got deleted just fine. What am I missing? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17403 --- Comment #5 from Marc Véron <veron@veron.ch> --- (In reply to Katrin Fischer from comment #4)
I can't reproduce the problem under Plack - patron got deleted just fine. What am I missing?
I tried again with scenario in initial comment and reproduced on current master. Plack error log says: exited nonzero: 1 /home/marc/members/deleteitem.pl exit 1 signals that there was an error in the script, but at this place we simply want to exit (without signaling an error). With patch applied deleting works fine. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17403 --- Comment #6 from David Cook <dcook@prosentient.com.au> --- Comment on attachment 56067 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=56067 Bug 17403: Internal Server Error while deleting patron Review of attachment 56067: --> (https://bugs.koha-community.org/bugzilla3/page.cgi?id=splinter.html&bug=17403&attachment=56067) ----------------------------------------------------------------- ::: members/deletemem.pl @@ -98,4 @@
if ( !C4::Context->IsSuperLibrarian() && $bor->{'branchcode'}){ unless ($userenv->{branch} eq $bor->{'branchcode'}){ print $input->redirect("/cgi-bin/koha/members/moremember.pl?borrowernumber=$member&error=CANT_DELETE_OTHERLIBRARY"); - exit;
"exit" is the same as "exit 0", so this doesn't really matter, but I'm certainly in favour of a consistent approach. Why use "exit 0" over "exit" though? Just to be more explicit? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17403 --- Comment #7 from Marc Véron <veron@veron.ch> --- (In reply to David Cook from comment #6)
Comment on attachment 56067 [details] [review] Bug 17403: Internal Server Error while deleting patron
Review of attachment 56067 [details] [review]: -----------------------------------------------------------------
::: members/deletemem.pl @@ -98,4 @@
if ( !C4::Context->IsSuperLibrarian() && $bor->{'branchcode'}){ unless ($userenv->{branch} eq $bor->{'branchcode'}){ print $input->redirect("/cgi-bin/koha/members/moremember.pl?borrowernumber=$member&error=CANT_DELETE_OTHERLIBRARY"); - exit;
"exit" is the same as "exit 0", so this doesn't really matter, but I'm certainly in favour of a consistent approach.
Why use "exit 0" over "exit" though? Just to be more explicit?
Yes. I prefer it because it clearly shows the intention. BTW, it's used at many other places as well ( git grep 'exit 0' ). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17403 --- Comment #8 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hah! ... my Plack was turned off, can reproduce the error now. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17403 --- Comment #9 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- We checked the code base - we have both, exit and exit 0. At the moment, I don't consider this a blocker here. If someone wants to standardize on one writing, they can do so in a separate patch :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17403 Katrin Fischer <katrin.fischer@bsz-bw.de> 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=17403 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #56067|0 |1 is obsolete| | --- Comment #10 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 56186 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=56186&action=edit [PASSED QA] Bug 17403: Internal Server Error while deleting patron This patch fixes a Internal Server Error while deleting patrons. To reproduce: - Go to a patron's detail page - Toolbar : More : Delete - Confirm "Are you sure you want to delete..." Result: Internal Server Error Plack error log: exited nonzero: 1 at /home/marc/koha/members/deletemem.pl Note: Patron is deleted Additional tests: Try to delete yourself, to delete a staff member without having superlibrarian permission etc. To test: - Apply patch - Re-start plack - Try to reproduce steps above (with other patron) Expected result: No Internal Server Error, Redirect to Home > Patrons Amended to include all occurences of 'exit 1' Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> Good catch Marc Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17403 Brendan Gallagher <brendan@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |brendan@bywatersolutions.co | |m Status|Passed QA |Pushed to Master --- Comment #11 from Brendan Gallagher <brendan@bywatersolutions.com> --- Pushed to Master - Should be in the November 16.11 release. Thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17403 Frédéric Demians <frederic@tamil.fr> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable CC| |frederic@tamil.fr --- Comment #12 from Frédéric Demians <frederic@tamil.fr> --- Pushed in 16.05. Will be in 16.05.05. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=17403 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |julian.maurice@biblibre.com --- Comment #13 from Julian Maurice <julian.maurice@biblibre.com> --- Pushed to 3.22.x, will be in 3.22.12 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org