Bug 8743: ZOOM error when merging authority change to biblios
The merge fails and the following errors appear in the log: [Sun Sep 02 23:38:10 2012] [error] [client 75.149.175.233] ZOOM error 25 "Specified element set name not valid for specified database" (addinfo: "F") from diag-set 'Bib-1', referer: http://****/cgi-bin/koha/authorities/authorities.pl?authid=3010 [Sun Sep 02 23:38:11 2012] [error] [client 75.149.175.233] Premature end of script headers: authorities.pl, referer: http://****/cgi-bin/koha/authorities/authorities.pl?authid=3010 Test plan: 1) Set dontmerge to "Do" 2) Find an authority that is linked to a bib record. 3) Edit the main entry of the authority. 4) Save the authority record. 5) Notice that you got a nasty error and the bib record was not updated. 6) Apply patch. 7) Edit the main entry of the authority again (you can just set it back to what it was to start with). 8) Save authority record. 9) Notice that there was no error, and the bib record was updated. 10) Sign off. Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
This commit is contained in:
parent
ef1fc52c71
commit
ffc6730552
1 changed files with 3 additions and 4 deletions
|
@ -1363,8 +1363,8 @@ sub merge {
|
|||
} else {
|
||||
#zebra connection
|
||||
my $oConnection=C4::Context->Zconn("biblioserver",0);
|
||||
my $oldSyntax = $oConnection->option("preferredRecordSyntax");
|
||||
$oConnection->option("preferredRecordSyntax"=>"XML");
|
||||
# We used to use XML syntax here, but that no longer works.
|
||||
# Thankfully, we don't need it.
|
||||
my $query;
|
||||
$query= "an=".$mergefrom;
|
||||
my $oResult = $oConnection->search(new ZOOM::Query::CCL2RPN( $query, $oConnection ));
|
||||
|
@ -1377,7 +1377,7 @@ sub merge {
|
|||
my $rec;
|
||||
$rec=$oResult->record($z);
|
||||
my $marcdata = $rec->raw();
|
||||
my $marcrecordzebra= MARC::Record->new_from_xml($marcdata,"utf8",C4::Context->preference("marcflavour"));
|
||||
my $marcrecordzebra= MARC::Record->new_from_usmarc($marcdata);
|
||||
my ( $biblionumbertagfield, $biblionumbertagsubfield ) = &GetMarcFromKohaField( "biblio.biblionumber", '' );
|
||||
my $i = ($biblionumbertagfield < 10) ? $marcrecordzebra->field($biblionumbertagfield)->data : $marcrecordzebra->subfield($biblionumbertagfield, $biblionumbertagsubfield);
|
||||
my $marcrecorddb=GetMarcBiblio($i);
|
||||
|
@ -1385,7 +1385,6 @@ sub merge {
|
|||
$z++;
|
||||
}
|
||||
$oResult->destroy();
|
||||
$oConnection->option("preferredRecordSyntax"=>$oldSyntax);
|
||||
}
|
||||
#warn scalar(@reccache)." biblios to update";
|
||||
# Get All candidate Tags for the change
|
||||
|
|
Loading…
Reference in a new issue