[Koha-devel] Tag error, and CGI::Carp and DebugLevel misbehaviour

Ignacio Javier ignacio.gomez at coremain.com
Wed Dec 5 17:30:28 CET 2007


Thanks Paul for addressing me in this direction (right, I think), lots of
thanks to everybody on this list which I love so much, and I promise hating
the rest of the world to make the comparison enough profitable... and:

$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
$$  A whole big sorry for reaching SMS fingers pain level $
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$

>> To the point:
--------------------

After using debugging information, seems Biblio.pm calls MARC::Field (line
2308):

            if ($biblionumbertagfield < 10) {
                $newfield = MARC::Field->new(
                    $biblionumbertagfield,
                    $cgi->param($param),
                );
And Field.pm constructor does not validate second argument to new sub:

    my $tagno = shift;
    ($tagno =~ /^[0-9A-Za-z]{3}$/)
        or croak( "Tag \"$tagno\" is not a valid tag." );

And this was "the crime scene"...

The cause seems to be a $biblionumbertagfield in Biblio.pm, line 2309, as
empty value, because of an undefined field called "biblio.biblionumber":

my ( $biblionumbertagfield, $biblionumbertagsubfield ) =
&GetMarcFromKohaField( "biblio.biblionumber", '' );

If I navigate to >> MARC Bibliographic Framework Test
in "Test Results" it show 5 errors (*), one of them related to an
"unmapping" to MARC of biblioitems.biblioitemnumber.

$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
$$$$$$$$ Is the cause, misconfiguration? $$$$$$$$$$$$$$$
$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$

When loading
http://192.168.2.185:8080/cgi-bin/koha/admin/biblio_framework.pl:

******************************************************************
MARC Framework for prueba (PPP1)
Create framework for PPP1 (prueba) using (default) [OK]
******************************************************************

When clicked OK appears:

http://192.168.2.185:8080/cgi-bin/koha/admin/marctagstructure.pl

The [New Tag] button seems to do nothing apart from going back to then
"replicate framework from...." screen, that is, no new tag addition.

So when trying to add a new MARC record all appears like "vacuum in
dysnomia" (***), seems that "this part of listing MARC records to be filled
in by user" is being executed by addbiblio.pl line 4xx, sub build_tabs,
involving @BIG_LOOP:

    $template->param( BIG_LOOP => \@BIG_LOOP );

... that loses miserably its battle to "the walk of life"(**) due to a being
an empty array problem.

I'm lost in the "reverse engineering" and my buffers of ibuprofen have ran
out some hours ago (seriously), where should I start to correct things in my
installation?

------------------------------
(*)
itemnum 	

    * The field itemnum MUST be mapped
    * The corresponding subfield MUST be in with -1 (ignore) tab

itemtype NOT mapped 	the biblioitems.itemtype field MUST :

    * be mapped to a MARC subfield,
    * the corresponding subfield MUST have authorised_value=itemtype

homebranch NOT mapped 	the items.homebranch field MUST :

    * be mapped to a MARC subfield,
    * the corresponding subfield MUST have authorised value=branches

holdingbranch NOT mapped 	the items.holdingbranch field MUST :

    * be mapped to a MARC subfield,
    * the corresponding subfield MUST have authorised value=branches

biblio and biblionumber 	The biblio.biblionumber and
biblioitems.biblioitemnumber fields be mapped to a MARC subfield,

------------------------------
(**)
http://en.wikipedia.org/wiki/Walk_of_Life_(Dire_Straits_song)

------------------------------
(***)
http://en.wikipedia.org/wiki/Dysnomia_(moon)

> -----Mensaje original-----
> De: Paul POULAIN [mailto:paul.poulain at free.fr]
> Enviado el: miércoles, 05 de diciembre de 2007 14:16
> Para: Ignacio Javier
> CC: koha-devel at nongnu.org
> Asunto: Re: [Koha-devel] Tag error, and CGI::Carp and DebugLevel
> misbehaviour
> 
> Ignacio Javier a écrit :
> > Hi all:
> >
> > 1) When trying to add a MARC Record (Addbiblio.pl), appears a software
> > error:
> >
> > 	Tag "" is not a valid tag. at
> > /usr/local/share/perl/5.8.8/C4/Biblio.pm 	line 2307
> > 	CGI::Carp
> >
> Those errors are VERY hard to understand and debug. The best would be to
> add some warn "==> ".Data::Dumper::Dumper($dunno_what) just before the
> line 2307 and investigate the resulting output to understand what is
> going wrong.
> Anyway, it means that MARC::Record has found that you tried to define a
> tag (000 => 999) as "" (empty), which is illegal. MARC::Record, in this
> case, dies, and there is no possibility to have it just ignore the thing
> and continue anyway.
> 
> --
> Paul POULAIN
> BibLibre SARL
> Expert en Logiciels Libres pour l'info-doc
> Tel : 04 91 31 45 19






More information about the Koha-devel mailing list