[Koha] Add item error

Ricardo Dias Marques lists at ricmarques.net
Tue Oct 6 12:39:43 NZDT 2009


Hi Martin (and Koha list)

On Mon, Oct 5, 2009 at 18:01, Martin Brenner
<martin.brenner at whitfieldschool.org> wrote:

> I noticed in the archives that someone else has had this problem. I
> can add a MARC record, but when I try to add an item associated with
> it on my new 3.00.03 Koha install on Ubuntu 9.04 I get the following
> error:
>
> Can't call method "append_fields" on an undefined value at
> /usr/local/share/perl/5.10.0/MARC/File/SAX.pm line 92.
>  at /usr/local/share/perl/5.10.0/MARC/File/SAX.pm line 92
>
> Bug number 3520 was opened and a patch was made. My question is, How
> do I get and/or apply this patch?

You're right, the bug was opened as bug number 3520 and a patch was
made (by Galen Charlton):

Bug 3520 - crash when adding or editing item record
http://bugs.koha.org/cgi-bin/bugzilla3/show_bug.cgi?id=3520


The Koha source code repository has a web page at http://git.koha.org/
- the "git" part of the URL is because it's running the "git" Version
Control System - http://git-scm.com

By doing some searches in http://git.koha.org/ for bug 3520, we can
see that the patch has been "pushed" to the "master" and "3.0.x"
branches of the Koha code. Specifically, the patch has been pushed in
the Koha source code repository, as the commit with the SHA-1 hash
7f7dfa0a11dd5d983deca2c18715b5126a11b12c


Here are the links to the "push" of this patch to the "master" and
"3.0.x" branches of Koha code:

- "Push" to the "master" branch of the Koha code (committed on 11-Aug 2009):

bug 3520: fix crash when adding or editing items
http://git.koha.org/cgi-bin/gitweb.cgi?p=Koha;a=commit;h=7f7dfa0a11dd5d983deca2c18715b5126a11b12c


- "Push" to the "3.0.x" branch of the Koha code (committed on 16-Sep-2009):

bug 3520: fix crash when adding or editing items
http://git.koha.org/cgi-bin/gitweb.cgi?p=Koha;a=commit;h=e0f1beb40ee59fda4bc8d5e0944e76c6cb22e03e


Because this commit has already been pushed to the "3.0.x" branch,
it's most likely that it will end up in the 3.0.4 release. So, if your
Koha installation is a production install, the safest option is
probably to wait for the release of Koha 3.0.4 and to do an upgrade
installation with that version (that's what I would do)!


If your installation is just a TEST installation - and NOT a
PRODUCTION one! - and you just want to test the patch for yourself,
you may:
1st - backup your Koha MySQL database,  with the "mysqldump" command ...
2nd - ... and then try one of the following options (DISCLAIMER: take
my advice with a grain of salt, considering that I'm NOT exactly a
Koha developer... I'm just the author of the installation guide of
Koha in openSUSE, I contribute to the Portuguese translation and,
occasionally, I report bugs and submit small patches to Koha code):

Option A) Given that this patch only replaces the "Search.pm" file,
you may backup your current "Search.pm" (located in the "C4" directory
of your Koha installation) - copy it to "Search.pm.ORIG", for instance
- and replace that file with the "blob" that's in the page for that
commit:

http://git.koha.org/cgi-bin/gitweb.cgi?p=Koha;a=blob;f=C4/Biblio.pm;h=ba6d62cfcdfd3b2659bd9c217207eff814d77373;hb=e0f1beb40ee59fda4bc8d5e0944e76c6cb22e03e

Note that it may happen that this "solution" does NOT work as
expected, because it's possible that there are other (previous)
changes in other files this patch may depend on.


Option B) Download and install the current "3.0.x" snapshot, located at:

http://git.koha.org/cgi-bin/gitweb.cgi?p=Koha;a=snapshot;h=3.0.x

Note that a current Koha "3.0.x" snapshot is NOT guaranteed to be in a
"stable" condition.

If you take this option, you may take the installation option of
upgrading a current installation, namely by running:

# perl Makefile.PL --prev-install-log /path/to/koha-install-log
# make test
# make install


Option C) Install "git", clone the "3.0.x" branch and do a "dev" install

There's some information about using "git" for Koha at:

Version Control for Koha using Git    [Koha Developer Wiki]
http://wiki.koha.org/doku.php?id=en:development:git_usage


I hope this helps you Martin!

Cheers,
Ricardo Dias Marques
lists AT ricmarques DOT net
Installation Guide for Installing Koha 3 on openSUSE 11
http://wiki.koha.org/doku.php?id=opensuse_11.0


More information about the Koha mailing list