Bugzilla – Attachment 15382 Details for
Bug 9620
IncludeSeeFromInSearches ON and data in $9 subfields can break indexing
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9620: IncludeSeeFromInSearches and date in $9 subfields can break indexing
Bug-9620-IncludeSeeFromInSearches-and-date-in-9-su.patch (text/plain), 2.64 KB, created by
Katrin Fischer
on 2013-02-15 17:07:57 UTC
(
hide
)
Description:
Bug 9620: IncludeSeeFromInSearches and date in $9 subfields can break indexing
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2013-02-15 17:07:57 UTC
Size:
2.64 KB
patch
obsolete
>From 85cfea6f22b50045ae7e2e067d8da915e78a8243 Mon Sep 17 00:00:00 2001 >From: Katrin Fischer <katrin.fischer@bsz-bw.de> >Date: Fri, 15 Feb 2013 17:55:38 +0100 >Subject: [PATCH] Bug 9620: IncludeSeeFromInSearches and date in $9 subfields can break indexing > >In Germany 020$9 is used to store the ISBN with hyphens. In rare cases this >can break indexing in combination with IncludeSeeFromInSearches. > >To reproduce: >1) Change your frameworks: > * Make sure 084 $a is visible > * Create a 084 $9 that you link to PERSO_NAME authorities. >2) Create a record or edit an existing one: > * Use the plugin on 084 to link the record to an authority. > * Make sure 400 is filled in your authority record. > >Preparations all done, now test indexing: > >3) Make sure IncludeSeeFromInSearches is OFF > * Reindexing should work without any problems. > >4) Activate IncludeSeeFromInSearches > * Reindexing should throw an error and stop: >201.Subfields are only for data fields (generally, >just tags >= 010 at /home/koha/Koha/Filter/MARC/EmbedSee >FromHEadings.pm line 94 > >5) Apply patch and reindex. > * No error should occur. > * Test 4xx fields from other tags were properly indexed. > >What causes the problem is the fact, that Koha tries to store >the date from the 400 in the bibliographic record for indexing. >For this it calculates a tag in the bibliographic record from the >tag it found the authority link in and the 4xx tags used in the >authority record. If you have an authority linked to a 0xx field >and the matching authority has a 4xx where xx < 10, the calculated >tag will be a control field. The attempt to add subfields to this >control field, is causing the error and breaks the indexing process. > >So what happened: The system found the $9, found the matching authority, found the 400, wanted to add the content of 400 to the bibliographic record for indexing, constructed a field that was below >010 to store the data in - and exploded. >Because controlfields have no subfields. (Naturally) >--- > Koha/Filter/MARC/EmbedSeeFromHeadings.pm | 1 + > 1 files changed, 1 insertions(+), 0 deletions(-) > >diff --git a/Koha/Filter/MARC/EmbedSeeFromHeadings.pm b/Koha/Filter/MARC/EmbedSeeFromHeadings.pm >index fc35a74..8ac3c35 100644 >--- a/Koha/Filter/MARC/EmbedSeeFromHeadings.pm >+++ b/Koha/Filter/MARC/EmbedSeeFromHeadings.pm >@@ -85,6 +85,7 @@ sub _processrecord { > my @newfields; > foreach my $authfield (@seefrom) { > my $tag = substr($field->tag(), 0, 1) . substr($authfield->tag(), 1, 2); >+ next if MARC::Field->is_controlfield_tag($tag); > my $newfield = MARC::Field->new($tag, > 'z', > $authfield->indicator(2) || ' ', >-- >1.7.2.5
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 9620
:
15382
|
15384
|
15422
|
15924