Bug 17123 - Can't call method "raw" on an undefined value at C4/Search.pm line 806
Summary: Can't call method "raw" on an undefined value at C4/Search.pm line 806
Status: RESOLVED DUPLICATE of bug 31614
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: 16.05
Hardware: All All
: P5 - low normal (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-15 02:50 UTC by Srdjan Jankovic
Modified: 2022-12-06 05:37 UTC (History)
6 users (show)

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


Attachments
While seaching OPAC shows this error in koha 16.05.03.000 (150.84 KB, image/png)
2016-09-19 04:59 UTC, Biju Varghese
Details
Staff interface (129.53 KB, image/png)
2016-09-19 05:01 UTC, Biju Varghese
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Srdjan Jankovic 2016-08-15 02:50:04 UTC

    
Comment 1 Tomás Cohen Arazi 2016-08-15 13:11:31 UTC
Srdjan, could you be more specific on how to reproduce it?
Comment 2 Srdjan Jankovic 2016-08-15 23:46:17 UTC
Unfortunately I cannot at the moment, it must be a combination of things introduced relatively recently to the master. I have not been playing with OPAC for a month or so, and this thing jumped on me. What I did meanwhile as well was to move zebra indexing to dom.
I'll try to see what exactly is causing it.
Comment 3 Biju Varghese 2016-09-19 04:59:26 UTC
Created attachment 55683 [details]
While seaching OPAC shows this error in koha 16.05.03.000

In koha version 16.05.03.000 shows this error message while searching. 

Error:
Can't call method "raw" on an undefined value at /usr/share/koha/lib/C4/Search.pm line 806.
Comment 4 Biju Varghese 2016-09-19 05:01:36 UTC
Created attachment 55684 [details]
Staff interface
Comment 5 Jonathan Druart 2016-10-05 07:56:30 UTC
This error usually happens when you zebra index is not up-to-date.
Comment 6 gabrielo 2017-01-17 16:09:53 UTC
Hello,

I have the same problem, someone has the solution, please?

Thanks!

GBO
Comment 7 Jonathan Druart 2017-01-17 16:34:38 UTC
Hi Gabrielo, did you update your zebra index?
Comment 8 gabrielo 2017-01-17 17:06:55 UTC
Hi, Jhonathan

Thanks for replying so quickly, look

I take it from the zebra page, but it seems that I do not update 

Debian users can add the following two lines in /etc/apt/sources.list
and use Debians own package management tools, apt-get, aptitude, or dselect.
Replace xxxxx with jessie, wheezy, etc.
As of June 2015,  Debian wheezy (7) is obsolete stable.
Debian jessie (8) is current stable.

deb http://ftp.indexdata.dk/debian xxxxx main
deb-src http://ftp.indexdata.dk/debian xxxxx main

These packages are signed with a key you can install as follows:
 wget http://ftp.indexdata.dk/debian/indexdata.asc
 sudo apt-key add indexdata.asc

Installed:
Zebra 2.0.44 (C) 1994-2010, Index Data ApS Zebra is free software
Comment 9 gabrielo 2017-01-17 17:17:04 UTC
Hi, Jhonathan

Thanks for replying so quickly, look

I take it from the zebra page, but it seems that I do not update 

Debian users can add the following two lines in /etc/apt/sources.list
and use Debians own package management tools, apt-get, aptitude, or dselect.
Replace xxxxx with jessie, wheezy, etc.
As of June 2015,  Debian wheezy (7) is obsolete stable.
Debian jessie (8) is current stable.

deb http://ftp.indexdata.dk/debian jessie main
deb-src http://ftp.indexdata.dk/debian jessie main

These packages are signed with a key you can install as follows:
 wget http://ftp.indexdata.dk/debian/indexdata.asc
 sudo apt-key add indexdata.asc

Installed:
Zebra 2.0.44 (C) 1994-2010, Index Data ApS Zebra is free software
Comment 10 Jonathan Druart 2017-01-18 07:42:09 UTC
Gabrielo, did you fully rebuild your zebra index using the koha-rebuild-zebra command?
Comment 11 gabrielo 2017-01-19 19:30:31 UTC
Hi,

Yes, look:

sudo apt-get update
sudo koha-rebuild-zebra -f -v 
sudo service apache2 restart

But, the update is not done.
Comment 12 Tomás Cohen Arazi 2017-01-19 20:02:43 UTC
(In reply to gabrielo from comment #11)
> Hi,
> 
> Yes, look:
> 
> sudo apt-get update
> sudo koha-rebuild-zebra -f -v 
> sudo service apache2 restart
> 
> But, the update is not done.

sudo koha-rebuild-zebra -f -a -b -v $(koha-list)

Regards
Comment 13 gabrielo 2017-01-19 20:54:40 UTC
Did not updated...(In reply to Tomás Cohen Arazi from comment #12)
> (In reply to gabrielo from comment #11)
> > Hi,
> > 
> > Yes, look:
> > 
> > sudo apt-get update
> > sudo koha-rebuild-zebra -f -v 
> > sudo service apache2 restart
> > 
> > But, the update is not done.
> 
> sudo koha-rebuild-zebra -f -a -b -v $(koha-list)
> 
> Regards

... Does not work anyway
Comment 14 Pablo AB 2018-07-27 19:45:18 UTC
On v17.11.07. I have the same issue but just with small keywords on the query, like opac-search.pl?q=a and q=aa
No changes with koha-rebuild-zebra -f -a -b -v instance, restarting services apache2 koha-common or rebooting.

The referenced line (Search.pm line 813):
# get the facet record from result set
my $facet = $rs->record( 0 )->raw;

Maybe is a timeout error/issue (2GB RAM, 1 vCPU). Happen after ~35 seconds of waiting. When searching zebrasrv (or starman worker) consume high percentages of CPU and then on plack-error.log (without any timestamp, but tested several times with tail -f):
Use of uninitialized value $error in concatenation (.) or string at /usr/share/koha/opac/cgi-bin/opac/opac-search.pl line 615
$template->param(query_error => $error.$@);
https://github.com/Koha-Community/Koha/blob/master/opac/opac-search.pl#L615

zebra-output.log just have the eternal classic log:
  zebrasrv(42) [warn] ir_session (exception)
zebra-error.log probably because the restarts/reboots
  killed by signal 15, stopping
Comment 15 David Cook 2022-12-06 05:37:29 UTC
There's really not enough information to proceed on this one.

However, Pablo's issue can be alleviated by updating zebra_connection_timeout in koha-conf.xml thanks to bug 31614

*** This bug has been marked as a duplicate of bug 31614 ***