[Bug 32641] New: Patron search is not working
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32641 Bug ID: 32641 Summary: Patron search is not working 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: librarian@pilani.bits-pilani.ac.in QA Contact: testopia@bugs.koha-community.org CC: gmcharlt@gmail.com, kyle.m.hall@gmail.com Created attachment 145332 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=145332&action=edit Patron search error by firstname or surname Not getting any search results using Firstname or surname in Koha 22.11.01. System returning 500: Internal server error - Month out of range.. -- 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=32641 Ranjan <librarian@pilani.bits-pilani.ac.in> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #145332|0 |1 is obsolete| | -- 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=32641 --- Comment #1 from Ranjan <librarian@pilani.bits-pilani.ac.in> --- Created attachment 145348 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=145348&action=edit Error message - returns after searching by Patron Firstname -- 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=32641 Ranjan <librarian@pilani.bits-pilani.ac.in> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #145348|Error message - returns |Error message - returns description|after searching by Patron |after searching by Patron |Firstname |Firstname (KOHA 22.11.01) -- 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=32641 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au --- Comment #2 from David Cook <dcook@prosentient.com.au> --- Sounds like bad data. Unfortunately, that makes this sound more like a support problem than a specific bug per se, although clearly the system should be handling the bad data more gracefully. -- 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=32641 --- Comment #3 from David Cook <dcook@prosentient.com.au> --- You may want to try the mailing lists, IRC, or contacting a support company: https://koha-community.org/support/ -- 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=32641 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Patron search is not |Patron search is not |working |working (when unable to | |process a bad date) -- 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=32641 --- Comment #4 from Ranjan <librarian@pilani.bits-pilani.ac.in> --- How to get the solution of this critical problem. -- 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=32641 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |indradg@l2c2.co.in --- Comment #5 from David Cook <dcook@prosentient.com.au> --- (In reply to David Cook from comment #3)
You may want to try the mailing lists, IRC, or contacting a support company: https://koha-community.org/support/
(In reply to Ranjan from comment #4)
How to get the solution of this critical problem.
Consider one of the options I provided in my earlier comment. -- I'm not able to reproduce the problem. That error suggests that your Koha API is sending bad data to the Koha UI, but the Koha database should prevent that bad date data from being possible. If we're going to determine whether or not there is a bug here, we're going to need more information. Is this a new installation of Koha, or did you upgrade from an older version? -- 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=32641 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Patron search is not |Patron search is not |working (when unable to |working (due to 500 |process a bad date) |internal server error) -- 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=32641 --- Comment #6 from David Cook <dcook@prosentient.com.au> --- You know what... the date stuff is a red herring. The real issue will be the 500 Internal Server Error. Ranjan, what do you see in the logs for your Koha? There should be some details in the logs files in your /var/log/koha/<instance>/* files. -- 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=32641 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |normal -- 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=32641 Ranjan <librarian@pilani.bits-pilani.ac.in> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Patron search is not |Patron search is not |working (due to 500 |working by firstname or |internal server error) |surname (due to 500 | |internal server error) -- 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=32641 Ranjan <librarian@pilani.bits-pilani.ac.in> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Patron search is not |Patron search is not |working by firstname or |working by firstname or |surname (due to 500 |surname after upgradation |internal server error) |from 22.05 to 22.11 (due to | |500 internal server error) -- 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=32641 --- Comment #7 from Ranjan <librarian@pilani.bits-pilani.ac.in> --- Upgraded from 22.05 to 22.11 -- 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=32641 quickfire28@gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |quickfire28@gmail.com --- Comment #8 from quickfire28@gmail.com --- i have the same error after upgrading koha to latest version. intranet-error.log [Thu Apr 27 09:30:07.295368 2023] [cgi:error] [pid 8558] [client 172.16.35.152:56691] AH01215: Odd number of elements in anonymous hash at /usr/share/koha/lib/Koha/Object.pm line 430.: /usr/share/koha/api/v1/app.pl, referer: http://172.16.35.114:15000/cgi-bin/koha/members/members-home.pl?firstletter=... [Thu Apr 27 09:30:07.308694 2023] [cgi:error] [pid 8558] [client 172.16.35.152:56691] AH01215: Odd number of elements in anonymous hash at /usr/share/koha/lib/Koha/Object.pm line 430.: /usr/share/koha/api/v1/app.pl, referer: http://172.16.35.114:15000/cgi-bin/koha/members/members-home.pl?firstletter=... [Thu Apr 27 09:30:07.322324 2023] [cgi:error] [pid 8558] [client 172.16.35.152:56691] AH01215: Odd number of elements in anonymous hash at /usr/share/koha/lib/Koha/Object.pm line 430.: /usr/share/koha/api/v1/app.pl, referer: http://172.16.35.114:15000/cgi-bin/koha/members/members-home.pl?firstletter=... [Thu Apr 27 09:30:07.331470 2023] [cgi:error] [pid 8558] [client 172.16.35.152:56691] AH01215: Odd number of elements in anonymous hash at /usr/share/koha/lib/Koha/Object.pm line 430.: /usr/share/koha/api/v1/app.pl, referer: http://172.16.35.114:15000/cgi-bin/koha/members/members-home.pl?firstletter=... [Thu Apr 27 09:30:07.343247 2023] [cgi:error] [pid 8558] [client 172.16.35.152:56691] AH01215: Odd number of elements in anonymous hash at /usr/share/koha/lib/Koha/Object.pm line 430.: /usr/share/koha/api/v1/app.pl, referer: http://172.16.35.114:15000/cgi-bin/koha/members/members-home.pl?firstletter=... [Thu Apr 27 09:30:07.354523 2023] [cgi:error] [pid 8558] [client 172.16.35.152:56691] AH01215: Odd number of elements in anonymous hash at /usr/share/koha/lib/Koha/Object.pm line 430.: /usr/share/koha/api/v1/app.pl, referer: http://172.16.35.114:15000/cgi-bin/koha/members/members-home.pl?firstletter=... [Thu Apr 27 09:30:07.395259 2023] [cgi:error] [pid 8558] [client 172.16.35.152:56691] AH01215: Odd number of elements in anonymous hash at /usr/share/koha/lib/Koha/Object.pm line 430.: /usr/share/koha/api/v1/app.pl, referer: http://172.16.35.114:15000/cgi-bin/koha/members/members-home.pl?firstletter=... [Thu Apr 27 09:30:07.416168 2023] [cgi:error] [pid 8558] [client 172.16.35.152:56691] AH01215: Odd number of elements in anonymous hash at /usr/share/koha/lib/Koha/Object.pm line 430.: /usr/share/koha/api/v1/app.pl, referer: http://172.16.35.114:15000/cgi-bin/koha/members/members-home.pl?firstletter=... [Thu Apr 27 09:30:07.424388 2023] [cgi:error] [pid 8558] [client 172.16.35.152:56691] AH01215: Odd number of elements in anonymous hash at /usr/share/koha/lib/Koha/Object.pm line 430.: /usr/share/koha/api/v1/app.pl, referer: http://172.16.35.114:15000/cgi-bin/koha/members/members-home.pl?firstletter=... [Thu Apr 27 09:30:07.433685 2023] [cgi:error] [pid 8558] [client 172.16.35.152:56691] AH01215: Odd number of elements in anonymous hash at /usr/share/koha/lib/Koha/Object.pm line 430.: /usr/share/koha/api/v1/app.pl, referer: http://172.16.35.114:15000/cgi-bin/koha/members/members-home.pl?firstletter=... [Thu Apr 27 09:30:07.459579 2023] [cgi:error] [pid 8558] [client 172.16.35.152:56691] AH01215: Odd number of elements in anonymous hash at /usr/share/koha/lib/Koha/Object.pm line 430.: /usr/share/koha/api/v1/app.pl, referer: http://172.16.35.114:15000/cgi-bin/koha/members/members-home.pl?firstletter=... [Thu Apr 27 09:30:07.467768 2023] [cgi:error] [pid 8558] [client 172.16.35.152:56691] AH01215: Odd number of elements in anonymous hash at /usr/share/koha/lib/Koha/Object.pm line 430.: /usr/share/koha/api/v1/app.pl, referer: http://172.16.35.114:15000/cgi-bin/koha/members/members-home.pl?firstletter=... [Thu Apr 27 09:30:07.478201 2023] [cgi:error] [pid 8558] [client 172.16.35.152:56691] AH01215: Odd number of elements in anonymous hash at /usr/share/koha/lib/Koha/Object.pm line 430.: /usr/share/koha/api/v1/app.pl, referer: http://172.16.35.114:15000/cgi-bin/koha/members/members-home.pl?firstletter=... [Thu Apr 27 09:30:07.514425 2023] [cgi:error] [pid 8558] [client 172.16.35.152:56691] AH01215: [2023-04-27 09:30:07.51414] [8559] [warn] OpenAPI
GET api/v1/patrons [{"message":"Month out of range.","path":"\\/body\\/0\\/date_renewed"},{"message":"Month out of range.","path":"\\/body\\/1\\/date_renewed"},{"message":"Month out of range.","path":"\\/body\\/12\\/date_renewed"},{"message":"Month out of range.","path":"\\/body\\/13\\/date_renewed"},{"message":"Month out of range.","path":"\\/body\\/14\\/date_renewed"},{"message":"Month out of range.","path":"\\/body\\/17\\/date_renewed"},{"message":"Month out of range.","path":"\\/body\\/18\\/date_renewed"},{"message":"Month out of range.","path":"\\/body\\/19\\/date_renewed"},{"message":"Month out of range.","path":"\\/body\\/2\\/date_renewed"},{"message":"Month out of range.","path":"\\/body\\/3\\/date_renewed"},{"message":"Month out of range.","path":"\\/body\\/4\\/date_renewed"},{"message":"Month out of range.","path":"\\/body\\/6\\/date_renewed"}]: /usr/share/koha/api/v1/app.pl, referer: http://172.16.35.114:15000/cgi-bin/koha/members/members-home.pl?firstletter=... [Thu Apr 27 09:30:07.950348 2023] [cgi:error] [pid 8560] [client 172.16.35.152:56711] AH01215: Odd number of elements in anonymous hash at /usr/share/koha/lib/Koha/Object.pm line 430.: /usr/share/koha/api/v1/app.pl, referer: http://172.16.35.114:15000/cgi-bin/koha/members/members-home.pl?firstletter=... [Thu Apr 27 09:30:07.965755 2023] [cgi:error] [pid 8560] [client 172.16.35.152:56711] AH01215: Odd number of elements in anonymous hash at /usr/share/koha/lib/Koha/Object.pm line 430.: /usr/share/koha/api/v1/app.pl, referer: http://172.16.35.114:15000/cgi-bin/koha/members/members-home.pl?firstletter=... [Thu Apr 27 09:30:07.975457 2023] [cgi:error] [pid 8560] [client 172.16.35.152:56711] AH01215: Odd number of elements in anonymous hash at /usr/share/koha/lib/Koha/Object.pm line 430.: /usr/share/koha/api/v1/app.pl, referer: http://172.16.35.114:15000/cgi-bin/koha/members/members-home.pl?firstletter=... [Thu Apr 27 09:30:07.983972 2023] [cgi:error] [pid 8560] [client 172.16.35.152:56711] AH01215: Odd number of elements in anonymous hash at /usr/share/koha/lib/Koha/Object.pm line 430.: /usr/share/koha/api/v1/app.pl, referer: http://172.16.35.114:15000/cgi-bin/koha/members/members-home.pl?firstletter=... [Thu Apr 27 09:30:08.008304 2023] [cgi:error] [pid 8560] [client 172.16.35.152:56711] AH01215: [2023-04-27 09:30:08.00812] [8561] [warn] OpenAPI GET api/v1/patrons [{"message":"Month out of range.","path":"\\/body\\/0\\/date_renewed"},{"message":"Month out of range.","path":"\\/body\\/2\\/date_renewed"},{"message":"Month out of range.","path":"\\/body\\/3\\/date_renewed"}]: /usr/share/koha/api/v1/app.pl, referer: http://172.16.35.114:15000/cgi-bin/koha/members/members-home.pl?firstletter=... [Thu Apr 27 09:30:58.802709 2023] [cgi:error] [pid 8621] [client 172.16.35.152:56745] AH01215: Odd number of elements in anonymous hash at /usr/share/koha/lib/Koha/Object.pm line 430.: /usr/share/koha/api/v1/app.pl, referer: http://172.16.35.114:15000/cgi-bin/koha/members/members-home.pl?firstletter=... [Thu Apr 27 09:30:58.838325 2023] [cgi:error] [pid 8621] [client 172.16.35.152:56745] AH01215: Odd number of elements in anonymous hash at /usr/share/koha/lib/Koha/Object.pm line 430.: /usr/share/koha/api/v1/app.pl, referer: http://172.16.35.114:15000/cgi-bin/koha/members/members-home.pl?firstletter=... [Thu Apr 27 09:30:58.874883 2023] [cgi:error] [pid 8621] [client 172.16.35.152:56745] AH01215: Odd number of elements in anonymous hash at /usr/share/koha/lib/Koha/Object.pm line 430.: /usr/share/koha/api/v1/app.pl, referer: http://172.16.35.114:15000/cgi-bin/koha/members/members-home.pl?firstletter=... [Thu Apr 27 09:30:58.982971 2023] [cgi:error] [pid 8621] [client 172.16.35.152:56745] AH01215: Odd number of elements in anonymous hash at /usr/share/koha/lib/Koha/Object.pm line 430.: /usr/share/koha/api/v1/app.pl, referer: http://172.16.35.114:15000/cgi-bin/koha/members/members-home.pl?firstletter=... [Thu Apr 27 09:30:59.076490 2023] [cgi:error] [pid 8621] [client 172.16.35.152:56745] AH01215: Odd number of elements in anonymous hash at /usr/share/koha/lib/Koha/Object.pm line 430.: /usr/share/koha/api/v1/app.pl, referer: http://172.16.35.114:15000/cgi-bin/koha/members/members-home.pl?firstletter=... [Thu Apr 27 09:30:59.095116 2023] [cgi:error] [pid 8621] [client 172.16.35.152:56745] AH01215: Odd number of elements in anonymous hash at /usr/share/koha/lib/Koha/Object.pm line 430.: /usr/share/koha/api/v1/app.pl, referer: http://172.16.35.114:15000/cgi-bin/koha/members/members-home.pl?firstletter=... [Thu Apr 27 09:30:59.162564 2023] [cgi:error] [pid 8621] [client 172.16.35.152:56745] AH01215: [2023-04-27 09:30:59.16167] [8622] [warn] OpenAPI GET api/v1/patrons [{"message":"Month out of range.","path":"\\/body\\/10\\/date_renewed"},{"message":"Month out of range.","path":"\\/body\\/11\\/date_renewed"},{"message":"Month out of range.","path":"\\/body\\/12\\/date_renewed"},{"message":"Month out of range.","path":"\\/body\\/15\\/date_renewed"},{"message":"Month out of range.","path":"\\/body\\/17\\/date_renewed"},{"message":"Month out of range.","path":"\\/body\\/18\\/date_renewed"}]: /usr/share/koha/api/v1/app.pl, referer: http://172.16.35.114:15000/cgi-bin/koha/members/members-home.pl?firstletter=...
-- 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=32641 --- Comment #9 from David Cook <dcook@prosentient.com.au> --- I had the same thing happen recently and it was bad data. You probably have '0000-00-00' in some of your date_renewed columns in the borrowers database table. Change those to NULL and you should be fine. -- 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=32641 --- Comment #10 from quickfire28@gmail.com --- (In reply to David Cook from comment #9)
I had the same thing happen recently and it was bad data.
You probably have '0000-00-00' in some of your date_renewed columns in the borrowers database table. Change those to NULL and you should be fine.
We already check it and there is no 0000-00-00 and already set to null -- 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=32641 --- Comment #11 from quickfire28@gmail.com --- (In reply to quickfire28 from comment #10)
(In reply to David Cook from comment #9)
I had the same thing happen recently and it was bad data.
You probably have '0000-00-00' in some of your date_renewed columns in the borrowers database table. Change those to NULL and you should be fine.
We already check it and there is no 0000-00-00 and already set to null
there are some with date in it (like this 2019-10-10) -- 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=32641 --- Comment #12 from quickfire28@gmail.com --- (In reply to quickfire28 from comment #11)
(In reply to quickfire28 from comment #10)
(In reply to David Cook from comment #9)
I had the same thing happen recently and it was bad data.
You probably have '0000-00-00' in some of your date_renewed columns in the borrowers database table. Change those to NULL and you should be fine.
Sorry my bad there are lots of 0000-00-00 on date_renewed columns.
Thank you! -- 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=32641 --- Comment #13 from quickfire28@gmail.com --- Thanks! it is working fine now :) -- 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=32641 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |WORKSFORME CC| |lucas@bywatersolutions.com -- 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=32641 Oleg Vasylenko <synapse.ova@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |synapse.ova@gmail.com --- Comment #14 from Oleg Vasylenko <synapse.ova@gmail.com> --- I had the same problem and solved it with this code: UPDATE borrowers SET date_renewed = NULL where date_renewed = "0000-00-00"; But lately I started receiving the same error 500 "Month out of range" on Koha 23.11. I checked if date_renewed contains wrong data but the problem was not with this column. /var/log/koha/lib/plack-api-error.log showed me the problem: [2024/08/12 16:15:44] [WARN] OpenAPI >>> GET api/v1/patrons [{"message":"Month out of range.","path":"\/body\/1\/last_seen"},{"message":"Month out of range.","path":"\/body\/12\/last_seen"},{"message":"Month out of range.","path":"\/body\/14\/last_seen"},{"message":"Month out of range.","path":"\/body\/16\/last_seen"},{"message":"Month out of range.","path":"\/body\/18\/last_seen"},{"message":"Month out of range.","path":"\/body\/19\/last_seen"},{"message":"Month out of range.","path":"\/body\/5\/last_seen"},{"message":"Month out of range.","path":"\/body\/7\/last_seen"},{"message":"Month out of range.","path":"\/body\/8\/last_seen"},{"message":"Month out of range.","path":"\/body\/9\/last_seen"}] So the problem was with column last_seen. You can use this SQL to check for a possible problem with data: SELECT count(*) FROM borrowers WHERE lastseen = "0000-00-00"; If this SQL returns 0, then there is no problem. If not, then you can solve it with SQL: UPDATE borrowers SET lastseen = NULL where lastseen = "0000-00-00"; -- 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