Monday, January 17, 2011

Breaking Koha

(following is mostly for my benefit)  In playing with the test version of Koha (just doing the simple things), I managed to break it.  After deleting a record, OPAC searches return the following error:

Can't call method "as_usmarc" on an undefined value at /usr/share/koha/lib/C4/Search.pm line 2384.

It took a bit of search in Google but I did come across this post from Mason James.  His recommendation is to run:

./bin/migration_tools/rebuild_nozebra.pl *or*./bin/migration_tools/rebuild_zebra.pl

Problem is that if you run the above from /usr/share/koha, you receive complaints about not being able to find the Perl module C4::Context. The solution is to run the script with the full path, like:

/usr/share/koha/bin/migration_tools/rebuild_nozebra.pl

The above rebuilds the BIBLIO and AUTHORITIES indexes and you should be able to search via the OPAC page again.