Bug 38150

Summary: Patron search error
Product: Koha Reporter: Govind Basedia <librarian>
Component: PatronsAssignee: Bugs List <koha-bugs>
Status: CLOSED INVALID QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: gmcharlt, kyle
Version: 23.11   
Hardware: PC   
OS: Linux   
GIT URL: Initiative type: ---
Sponsorship status: --- Comma delimited list of Sponsors:
Crowdfunding goal: 0 Crowdfunding committed: 0
Crowdfunding contact: Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Govind Basedia 2024-10-11 07:41:33 UTC
Dear Sir/madam

Please help to resolve this issue :

I have a system with Ubuntu 22.04 and Koha version 23.11.08
Yesterday I installed koha 23.11.08 in Ubuntu 22.04.
When I search any patron by name I am getting this error

Something went wrong when loading the table.
500: Internal Server Error.
Month out of range.
Comment 1 Katrin Fischer 2024-10-11 08:00:33 UTC
Hi, this is due to an invalid date in your borrowers table (0000-00-00).
Bug 31143 works on a script to identify and fix these errors.

Meanwhile you can find the problematic ones with SQL:

select date_renewed, dateofbirth, dateenrolled, dateexpiry, lastseen, updated_on, debarred 
from borrowers where date_renewed = '0000-00-00' or dateexpiry = '0000-00-00' or dateenrolled = '0000-00-00' or dateofbirth = 
'0000-00-00' or lastseen = '0000-00-00' or updated_on = '0000-00-00' or debarred = '0000-00-00';

You need to replace them with NULL.