Hello everyone?
Hi Everyone. This software error message come up when performing items checkin? Can't call method "truncate" on an undefined value at /usr/share/koha/lib/C4/Circulation.pm line 1966 Thank very much in advance for any help. Kind regards
Could you report the borrowers.debarred value for the patron you are checkin the item out.
Hello Jonathan, thanks. The value is NULL. And we got the same value for all patrons. I think this is how it should be right? Thank you very much Kind regards Francisco
With a debarred value set to NULL, I don't know at all how you could get this error. Could you confirm that the line 1966 of your C4/Circulation.pm is the same as the ligne 1972 of the following snippet (from 3.20.x): 1967 } elsif ( $issue->{date_due} and $borrower->{'debarred'} ) { 1968 if ( $borrower->{debarred} eq "9999-12-31") { 1969 $messages->{'ForeverDebarred'} = $borrower->{'debarred'}; 1970 } else { 1971 my $borrower_debar_dt = dt_from_string( $borrower->{debarred} ); 1972 $borrower_debar_dt->truncate(to => 'day'); 1973 my $today_dt = $today->clone()->truncate(to => 'day'); 1974 if ( DateTime->compare( $borrower_debar_dt, $today_dt ) != -1 ) { 1975 $messages->{'PrevDebarred'} = $borrower->{'debarred'}; 1976 } 1977 }
I am also getting that error: /usr/share/koha/lib/C4/Circulation.pm line 1966. After reading your questions we ran a report on our users and found that a group of users has the value 0000-00-00 in column debarred and apparently is haunted by above error when returning items. cardnumber;borrowernumber;surname;firstname;debarred 1;1;Admin;Koha; 23529001223637;51;Lanz;Stefan; 23529001223638;52;Pelosi;Silvia; ... P2304-20150001;57;Landwehr;"Mara ";0000-00-00 P2304-20150002;58;Petry;Margit;0000-00-00 P2304-20150003;59;Friedrich-Sander;Heide;0000-00-00 ... That group may be a set of users that were imported in 2015 under then 3.18. But I am not sure about this. The error message pops up when such users return items. Unfortunately I do not know how to correct the situation, how to reset the values of debarred in table Table testsql_comments.borrowers (assuming this is the value causing the trouble) debarred date 10 √ null until this date the patron can only check-in (no loans, no holds, etc.), is a fine based on days instead of money (YYY-MM-DD) If I try to manually correct the debarred date I can not find a menue to do so. Editing the patron attributes the attributes in this koha version (3.20.00.000) do not include the debarred date. The koha manual is not helpful. I have never before operated directly on the mysql database, I only ran reports sofar. Since I have 186 occurrences of debarred = 0000-00-00 A script would be helpful. I am also ignorant if it is ok to adjust the debarred value and not to make other corrections to maintain consistency. Here are my lines from sudo vi /usr/share/koha/lib/C4/Circulation.pm 1965 my $borrower_debar_dt = dt_from_string( $borrower->{debarred} ); 1966 $borrower_debar_dt->truncate(to => 'day'); 1967 my $today_dt = $today->clone()->truncate(to => 'day');
See bug 14717, which has been pushed to 3.20.4
should this bug be closed?
Hello I think this bug is now solved. After we update to version 3.22.02.000 we stop having this problem. Thank you all Kind regards
Thank you for the feedback, closing.