[Bug 14067] New: 500 error when deleting patrons
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14067 Bug ID: 14067 Summary: 500 error when deleting patrons Change sponsored?: --- Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Patrons Assignee: koha-bugs@lists.koha-community.org Reporter: amy@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com Created attachment 38571 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=38571&action=edit delete patron error msg screen Partners getting a 500 error (screenshot attached) when attempting to delete patrons. It may be that as long as all of the required fields are filled in this error does not occur. But if any fields are missing the error is seen. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14067 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au --- Comment #1 from David Cook <dcook@prosentient.com.au> --- If you look in your intranet error logs, you should be able to find the root cause.
From the sound of it, I'm guessing that it's a SQL error. Worth checking to see if MySQL is in strict mode. Koha and MySQL in strict mode don't get along very well.
-- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14067 Barton Chittenden <barton@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |barton@bywatersolutions.com --- Comment #2 from Barton Chittenden <barton@bywatersolutions.com> --- Here's the error as found in intranet-error.log [Mon May 04 08:52:27 2015] [error] [client xx.xx.xx.xx] [Mon May 4 08:52:27 2015] deletemem.pl: DBD::mysql::st execute failed: Column 'cardnumber' cannot be null at /usr/local/share/perl/5.10.1/DBIx/Class/Storage/DBI.pm line 1834. [Mon May 04 08:52:27 2015] [error] [client xx.xx.xx.xx] Premature end of script headers: deletemem.pl -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14067 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #3 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hm, is the cardnumber set for the patron they are trying to delete? The cardnumber should never be empty. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14067 --- Comment #4 from David Cook <dcook@prosentient.com.au> --- (In reply to Barton Chittenden from comment #2)
Here's the error as found in intranet-error.log
[Mon May 04 08:52:27 2015] [error] [client xx.xx.xx.xx] [Mon May 4 08:52:27 2015] deletemem.pl: DBD::mysql::st execute failed: Column 'cardnumber' cannot be null at /usr/local/share/perl/5.10.1/DBIx/Class/Storage/DBI.pm line 1834. [Mon May 04 08:52:27 2015] [error] [client xx.xx.xx.xx] Premature end of script headers: deletemem.pl
That's an interesting error. When I look at my databases, 'cardnumber' is a nullable column. I'd suggest looking at Koha::Schema::Result::Borrower.pm and seeing if "cardnumber" has "is_nullable" set to 1. I'd also check the actual database to see if it's a nullable column... -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14067 --- Comment #5 from Barton Chittenden <barton@bywatersolutions.com> --- (In reply to David Cook from comment #4)
(In reply to Barton Chittenden from comment #2)
Here's the error as found in intranet-error.log
[Mon May 04 08:52:27 2015] [error] [client xx.xx.xx.xx] [Mon May 4 08:52:27 2015] deletemem.pl: DBD::mysql::st execute failed: Column 'cardnumber' cannot be null at /usr/local/share/perl/5.10.1/DBIx/Class/Storage/DBI.pm line 1834. [Mon May 04 08:52:27 2015] [error] [client xx.xx.xx.xx] Premature end of script headers: deletemem.pl
That's an interesting error. When I look at my databases, 'cardnumber' is a nullable column. I'd suggest looking at Koha::Schema::Result::Borrower.pm and seeing if "cardnumber" has "is_nullable" set to 1. I'd also check the actual database to see if it's a nullable column...
Yes, borrowers.cardnumber is nullable in the database in question: mysql> describe borrowers; +---------------------+--------------+------+-----+---------+----------------+ | Field | Type | Null | Key | Default | Extra | +---------------------+--------------+------+-----+---------+----------------+ | borrowernumber | int(11) | NO | PRI | NULL | auto_increment | | cardnumber | varchar(16) | YES | UNI | NULL | | and in /usr/share/koha/lib/Koha/Schema/Result/Borrower.pm =head2 cardnumber data_type: 'varchar' is_nullable: 1 size: 16 So... I don't know. -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14067 Arturo <library@sll.texas.gov> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |library@sll.texas.gov --- Comment #6 from Arturo <library@sll.texas.gov> --- Our library is experiencing this bug, and to add a little more insight, even though the DB 'cardnumber' field is nullable, we've set our BorrowerMandatoryField sys pref to require a value for the 'cardnumber' field. In our case, we allow self-registrations, and during the self-registration process, a card number is not automatically generated -- we manually add that in later once we review each self-registration. So when we come across a self-registered patron during our workflow whose account we need to delete, we get this error since we are trying to delete the account and it does not have one of the required fields. In other words, I don't think this bug involves a SQL error -- perhaps it is needlessly running a check on required fields before deleting the account? -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14067 --- Comment #7 from David Cook <dcook@prosentient.com.au> --- I can't reproduce this one on 3.14.5 or master. Barton: I'd suggest checking /usr/local/share/perl/5.10.1/DBIx/Class/Storage/DBI.pm line 1834 I use Perl 5.20.1 and that line doesn't seem relevant in my DBIx::Class::Storage::DBI. Which version of DBIx::Class are you using? It looks like we're using version 0.082810. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14067 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kyle@bywatersolutions.com --- Comment #8 from Kyle M Hall <kyle@bywatersolutions.com> --- When I see this it is because the deletedborrowers table has cardnumber set to NOT NULL despite the fact that it should be NULL DEFAULT NULL. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14067 BUWM <w.miedzybrodzki@uw.edu.pl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |w.miedzybrodzki@uw.edu.pl --- Comment #9 from BUWM <w.miedzybrodzki@uw.edu.pl> --- Created attachment 43437 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=43437&action=edit error when deleting patron We also had problem with deleting patrons. `borrowers` . `password` was VARCHAR(60), while `deletedborrowers` . `password` was VARCHAR(30). Setting the latter to 60 resolved this issue in our case (Koha 3.20.01) -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=14067 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=15517 CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #10 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to BUWM from comment #9)
Created attachment 43437 [details] error when deleting patron
We also had problem with deleting patrons. `borrowers` . `password` was VARCHAR(60), while `deletedborrowers` . `password` was VARCHAR(30). Setting the latter to 60 resolved this issue in our case (Koha 3.20.01)
This will be fixed by bug 15517. -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org