Bug 31279 - Getting error 500 while doing a search in koha catalogue
Summary: Getting error 500 while doing a search in koha catalogue
Status: CLOSED INVALID
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: 21.11
Hardware: All All
: P5 - low critical (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-08-02 02:34 UTC by NAYEMA NASRIN
Modified: 2023-06-08 22:26 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description NAYEMA NASRIN 2022-08-02 02:34:06 UTC
I am facing an error in the cataloguing section in my koha 21.11.05 server. I did not receive any errors till saturday. However, this  morning I started receiving an "error 500" while doing a catalog search on the staff page and even Web OPAC is throwing the same error. Even cataloguing of new items and records is also throwing same error.  I have two instances and the other instance is working fine, there is no error.   I dont have any issue with patron search and check in, check out. But while doing catalogue search it gives error. also I would like to mention that in the morning, the koha page was not appearing..it was showing internal server error...when I reboot my system the page appeared bt while doing search in catalogue it gives error 500.
Comment 1 NAYEMA NASRIN 2022-08-02 03:57:01 UTC
Following error has been found:

 tail -f /var/log/koha/library/*.log
==> /var/log/koha/library/api-error.log <==

==> /var/log/koha/library/indexer-error.log <==

==> /var/log/koha/library/indexer-output.log <==

==> /var/log/koha/library/intranet-error.log <==
[Tue Aug 02 09:14:36.841011 2022] [cgi:error] [pid 238347] [client 192.168.0.52:54524] AH01215: Use of uninitialized value $tag in hash element at /usr/share/perl5/MARC/Record.pm line 202.: /usr/share/koha/intranet/cgi-bin/catalogue/search.pl, referer: http://192.168.0.6:9001/index.html
[Tue Aug 02 09:14:36.841141 2022] [cgi:error] [pid 238347] [client 192.168.0.52:54524] AH01215: Use of uninitialized value $tag in regexp compilation at /usr/share/perl5/MARC/Record.pm line 206.: /usr/share/koha/intranet/cgi-bin/catalogue/search.pl, referer: http://192.168.0.6:9001/index.html
[Tue Aug 02 09:14:36.841262 2022] [cgi:error] [pid 238347] [client 192.168.0.52:54524] AH01215: Use of uninitialized value $tag in hash element at /usr/share/perl5/MARC/Record.pm line 207.: /usr/share/koha/intranet/cgi-bin/catalogue/search.pl, referer: http://192.168.0.6:9001/index.html
[Tue Aug 02 09:14:36.841385 2022] [cgi:error] [pid 238347] [client 192.168.0.52:54524] AH01215: Can't call method "data" on an undefined value at /usr/share/koha/lib/C4/Search.pm line 1713.: /usr/share/koha/intranet/cgi-bin/catalogue/search.pl, referer: http://192.168.0.6:9001/index.html
[Tue Aug 02 09:14:36.905102 2022] [cgi:error] [pid 238347] [client 192.168.0.52:54524] End of script output before headers: search.pl, referer: http://192.168.0.6:9001/index.html
[Tue Aug 02 09:14:38.976898 2022] [cgi:error] [pid 238345] [client 192.168.0.1:49451] AH01215: Use of uninitialized value in string eq at /usr/share/koha/lib/C4/Context.pm line 784.: /usr/share/koha/intranet/cgi-bin/members/patronimage.pl, referer: http://192.168.0.6:9001/cgi-bin/koha/members/paycollect.pl?borrowernumber=84081&change_given=
[Tue Aug 02 09:14:39.367292 2022] [cgi:error] [pid 238347] [client 192.168.0.52:54524] AH01215: Use of uninitialized value in string eq at /usr/share/koha/lib/C4/Context.pm line 784.: /usr/share/koha/intranet/cgi-bin/errors/500.pl, referer: http://192.168.0.6:9001/index.html
[Tue Aug 02 09:14:52.871362 2022] [cgi:error] [pid 238425] [client 192.168.0.1:49453] AH01215: Use of uninitialized value in string eq at /usr/share/koha/lib/C4/Context.pm line 784.: /usr/share/koha/intranet/cgi-bin/members/paycollect.pl, referer: http://192.168.0.6:9001/cgi-bin/koha/members/paycollect.pl?borrowernumber=84081&change_given=
[Tue Aug 02 09:14:55.993091 2022] [cgi:error] [pid 238447] [client 192.168.0.1:49455] AH01215: Use of uninitialized value in string eq at /usr/share/koha/lib/C4/Context.pm line 784.: /usr/share/koha/intranet/cgi-bin/members/boraccount.pl, referer: http://192.168.0.6:9001/cgi-bin/koha/members/paycollect.pl?borrowernumber=84081&change_given=
[Tue Aug 02 09:14:58.992187 2022] [cgi:error] [pid 238447] [client 192.168.0.1:49455] AH01215: Use of uninitialized value in string eq at /usr/share/koha/lib/C4/Context.pm line 784.: /usr/share/koha/intranet/cgi-bin/members/patronimage.pl, referer: http://192.168.0.6:9001/cgi-bin/koha/members/boraccount.pl?borrowernumber=84081&payment_id=252196&change_given=

==> /var/log/koha/library/opac-error.log <==
[Tue Aug 02 09:16:05.659083 2022] [cgi:error] [pid 238744] [client 185.191.171.34:32608] AH01215: Use of uninitialized value in substitution (s///) at /usr/share/koha/opac/cgi-bin/opac/opac-ISBDdetail.pl line 203.: /usr/share/koha/opac/cgi-bin/opac/opac-ISBDdetail.pl
[Tue Aug 02 09:16:07.212881 2022] [cgi:error] [pid 238746] [client 40.77.167.15:12032] AH01215: C4::Context->userenv not defined! at /usr/share/koha/lib/C4/Items.pm line 767.: /usr/share/koha/opac/cgi-bin/opac/opac-detail.pl
[Tue Aug 02 09:16:07.236357 2022] [cgi:error] [pid 238746] [client 40.77.167.15:12032] AH01215: No biblionumber tag for framework "BKS" at /usr/share/koha/lib/C4/Biblio.pm line 2659.: /usr/share/koha/opac/cgi-bin/opac/opac-detail.pl
[Tue Aug 02 09:16:07.300138 2022] [cgi:error] [pid 238746] [client 40.77.167.15:12032] End of script output before headers: opac-detail.pl
[Tue Aug 02 09:16:11.010817 2022] [cgi:error] [pid 238759] [client 185.191.171.4:55352] AH01215: C4::Context->userenv not defined! at /usr/share/koha/lib/C4/Items.pm line 767.: /usr/share/koha/opac/cgi-bin/opac/opac-detail.pl
[Tue Aug 02 09:16:11.027934 2022] [cgi:error] [pid 238759] [client 185.191.171.4:55352] AH01215: No biblionumber tag for framework "" at /usr/share/koha/lib/C4/Biblio.pm line 2659.: /usr/share/koha/opac/cgi-bin/opac/opac-detail.pl
[Tue Aug 02 09:16:11.092130 2022] [cgi:error] [pid 238759] [client 185.191.171.4:55352] End of script output before headers: opac-detail.pl
[Tue Aug 02 09:16:19.371284 2022] [cgi:error] [pid 238782] [client 185.191.171.6:56588] AH01215: C4::Context->userenv not defined! at /usr/share/koha/lib/C4/Items.pm line 767.: /usr/share/koha/opac/cgi-bin/opac/opac-detail.pl
[Tue Aug 02 09:16:19.392850 2022] [cgi:error] [pid 238782] [client 185.191.171.6:56588] AH01215: No biblionumber tag for framework "BKS" at /usr/share/koha/lib/C4/Biblio.pm line 2659.: /usr/share/koha/opac/cgi-bin/opac/opac-detail.pl
Comment 2 Katrin Fischer 2022-08-02 21:40:25 UTC
Hi Nayema, this looks like a configuration issue: Have you made any changes to the frameworks Koha installs with?

This is the hint:
No biblionumber tag for framework "BKS"

You don't want to change the 999 tag as it holds the biblionumber/biblioitemnumber. If it's changed you might end up with records without biblionumber that cannot be indexed and therefore not searched. First thing you need to do is to reinstate correct frameworks, then you can try to fix the records.