Tag error, and CGI::Carp and DebugLevel misbehaviour
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 2) On the other hand a: mysql> SELECT variable,value FROM systempreferences WHERE variable LIKE %debug%'; results in: +------------+-------+ | variable | value | +------------+-------+ | DebugLevel | 2 | +------------+-------+ 1 row in set (0.00 sec) Seems I've got maximum debug level set, but in fact is not sending to browser the perl call stack dump, as expected (and not any "debug level 2" message). Anybody knows why? ----------------- Dump of about.pl: Server information Koha version: 3.00.00.031 OS version ('uname -a'): Linux ignaciojavier 2.6.18-5-686 #1 SMP Wed Oct 3 00:12:50 UTC 2007 i686 GNU/Linux Perl version: 5.008008 MySQL version: mysql Ver 14.12 Distrib 5.0.32, for pc-linux-gnu (i486) using readline 5.2 Apache version: Zebra version: Zebra 1.3.50 $Date: 2007-10-16 10:10:37 $ (C) 1994-2005, Index Data ApS Using: libbzip2, (C) 1996-1999 Julian R Seward. All rights reserved. Using: Tcl 8.3 Perl modules Biblio::EndnoteStyle 0.05 CGI 3.15 CGI::Carp 1.29 CGI::Session 4.20 Class::Accessor 0.31 Class::Factory::Util 1.7 DBD::mysql 3.0008 DBI 1.53 Data::Dumper 2.121_08 Date::Calc 5.4 Date::Manip 5.44 Digest::MD5 2.36 File::Temp 0.19 GD::Barcode::UPCE 1.1 Getopt::Long 2.35 Getopt::Std 1.05 HTML::Template::Pro 0.65 HTTP::Cookies 1.39 HTTP::Request::Common 1.26 LWP::Simple 1.41 LWP::UserAgent 2.033 Lingua::Stem 0.82 List::Util 1.19 Locale::Language 2.07 MARC::Charset 0.98 MARC::Crosswalk::DublinCore 0.02 MARC::File::XML 0.86 MARC::Record 2.0.0 MIME::Base64 3.07 MIME::QuotedPrint 3.07 Mail::Sendmail 0.79 Net::Z3950::ZOOM 1.21 PDF::API2 2.014 PDF::API2::Page 2.001 PDF::API2::Util 2.000 PDF::Reuse 0.33 PDF::Reuse::Barcode 0.05 POSIX 1.09 Schedule::At 1.06 Term::ANSIColor 1.10 Test 1.25 Test::Harness 3.03 Test::More 0.72 Text::CSV 0.01 Text::Wrap 2005.082401 Time::HiRes 1.86 Time::localtime 1.02 Unicode::Normalize 0.32 XML::Dumper 0.81 XML::LibXML 1.65 XML::LibXSLT 1.63 XML::RSS 1.31 XML::SAX::ParserFactory 1.01 XML::Simple 2.14 ------------------------------------- Ignacio Javier Gómez Rodríguez Área de Consultoría Tfno: 902905590 - Fax: 981571425 ignacio.gomez@coremain.com www.coremain.com
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
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@free.fr] Enviado el: miércoles, 05 de diciembre de 2007 14:16 Para: Ignacio Javier CC: koha-devel@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
participants (2)
-
Ignacio Javier -
Paul POULAIN