[Bug 28048] New: Getting Internal Server Error while importing Patrons
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28048 Bug ID: 28048 Summary: Getting Internal Server Error while importing Patrons Change sponsored?: --- Product: Koha Version: unspecified Hardware: HP OS: Linux Status: NEW Severity: enhancement Priority: P5 - low Component: Tools Assignee: koha-bugs@lists.koha-community.org Reporter: vermanite@gmail.com QA Contact: testopia@bugs.koha-community.org Created attachment 118917 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=118917&action=edit Screenshot of error Getting Internal Server Error While importing patrons in .CSV format. This error occurs only when I am trying to import new patrons in CSV format. Server Details: OS: Ubuntu 16.04 LTS KOHA Version: 16.11.14.000 MySQL version: mysql Ver 14.14 Distrib 5.7.33 -- 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=28048 Nitesh Kumar Verma <vermanite@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- 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=28048 Nitesh Kumar Verma <vermanite@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 - low |P1 - high -- 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=28048 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Getting Internal Server |Can't import patrons |Error while importing |without checkprevcheckout |Patrons |and autorenew_checkouts Version|unspecified |master Priority|P1 - high |P5 - low Severity|critical |major OS|Linux |All Hardware|HP |All --- Comment #1 from Owen Leonard <oleonard@myacpl.org> --- I don't know if this is the same issue, but I'll take over this bug since there are no other details: Although they're not mentioned on the page as required field, it doesn't seem to be possible to import a CSV of patrons without putting a value in the checkprevcheckout and autorenew_checkouts columns. An error appears in the log if you omit them: [WARN] DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Column 'autorenew_checkouts' cannot be null [for Statement "UPDATE `borrowers` SET `autorenew_checkouts` = ?, `checkprevcheckout` = ?, `dateexpiry` = ?, `dateofbirth` = ?, `debarred` = ?, `flags` = ?, `gonenoaddress` = ?, `lang` = ?, `lost` = ?, `password` = ?, `relationship` = ?, `updated_on` = current_timestamp, `userid` = ? WHERE ( `borrowernumber` = ? )" with ParamValues: 0=undef, 1=undef, 2='2024-03-30T00:00:00', 3=undef, 4=undef, 5=undef, 6=undef, 7=undef, 8=undef, 9='!', 10=undef, 11='test.test', 12='65581'] at /kohadevbox/koha/Koha/Object.pm line 169 [WARN] DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Column 'checkprevcheckout' cannot be null [for Statement "UPDATE `borrowers` SET `checkprevcheckout` = ?, `dateexpiry` = ?, `dateofbirth` = ?, `debarred` = ?, `flags` = ?, `gonenoaddress` = ?, `lang` = ?, `lost` = ?, `password` = ?, `relationship` = ?, `updated_on` = current_timestamp, `userid` = ? WHERE ( `borrowernumber` = ? )" with ParamValues: 0=undef, 1='2024-03-30T00:00:00', 2=undef, 3=undef, 4=undef, 5=undef, 6=undef, 7=undef, 8='!', 9=undef, 10='test.test', 11='65581'] at /kohadevbox/koha/Koha/Object.pm line 169 -- 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=28048 --- Comment #2 from Nitesh Kumar Verma <vermanite@gmail.com> --- Owen Sir, I am using ../cgi-bin/koha/tools/import_borrowers.pl to import patron in .CSV format. I have upgraded from koha version from 16.05 to 16.11. After upgrading I am facing this error. I am using the same method as I have used earlier. Running KOHA since 2015 and have more than 8000 patron records. CSV Headers I am using: cardnumber,surname,patron_attributes,phone,address,branchcode,categorycode,email,password,userid. I am stuck in between as it is not possible to manually enter the details of 3000-4000 patron details on KOHA. Any help in this regard is highly appreciated. -- 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=28048 --- Comment #3 from Owen Leonard <oleonard@myacpl.org> --- (In reply to Nitesh Kumar Verma from comment #2)
I have upgraded from koha version from 16.05 to 16.11.
I'm sorry but 16.11 is a very old Koha version and isn't supported anymore. -- 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=28048 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@bugs.koha-c | |ommunity.org --- Comment #4 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- I don't recreate, Owen. I tried to create and update a patron with a csv without and without autorenew_checkouts, checkprevcheckout in the headers (and no value), but they got created/updated correctly. -- 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=28048 --- Comment #5 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Looks like the following change is needed @ Koha/Patrons/Import.pm:238 @ sub import_patrons { # Remove warning for int datatype that cannot be null # Argument "" isn't numeric in numeric eq (==) at /usr/share/perl5/DBIx/Class/Row.pm line 1018 for my $field ( - qw( privacy privacy_guarantor_fines privacy_guarantor_checkouts anonymized login_attempts )) + qw( privacy privacy_guarantor_fines privacy_guarantor_checkouts anonymized login_attempts autorenew_checkouts )) -- 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=28048 Nitesh Kumar Verma <vermanite@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |WORKSFORME --- Comment #6 from Nitesh Kumar Verma <vermanite@gmail.com> --- Thanks Owen Leonard & Jonathan Druart for your perusal. I have updated from Mysql to MariaDB and the said problem resolved automatically. -- 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