Koha/C4
Ian Walls 4e95e94727 Bug 6789: biblios with many items can result in broken search results link
This patch fixes an issue whereby biblios with many items (often > 500) would index,
but not the biblionumber itself, resulting in search results with a) inaccurate item counts
and b) no biblionumber to use in the link to the details page.  This is due to Net::Z3950::ZOOM  not providing
a mechanism for specifying different connection attributes; the maximumRecordSize ZOOM connection attribute,
if not specified, defaults to 1MB, which is less than the size of a MARC record with many, many 952 fields.  Since
it is unlikely we can fix Net::Z3950::ZOOM in a timely fashion, this patch aims to build a workaround on the Koha end.

This patch changes EmbedItemsInMarcBiblio to use append_fields instead of insert_ordered_fields,
so the 999$c will come before the item records.  It's VERY unlikely we will encounter more than 1MB of biblio-level MARC
content, as this would break the ISO-2709 standard by a large factor.

To this end, it also moves the fix_biblio_ids portion of get_corrected_marc_record out of rebuild_zebra.pl,
and makes it a part of GetMarcBiblio (right before EmbedItemsInMarcBiblio, so the 952s still come last).  fix_biblio_ids
is kept as a subroutine for the deletion portion of rebuild_zebra.pl, which still uses it.

It also uses the subroutine parameter in GetMarcBiblio to do the EmbedItemsInMarcBiblio action, rather than having
rebuild_zebra.pl perform it on the itemless record returned from GetMarcBiblio.  Simpler and cleaner that way.

To verify bug issue:
1. Find a biblio with over 700 items (or enough that the resulting MARCXML is greater than 1MB)
2. search for this biblio (in a search that would return multiple results, not just this title).  You should get the title in
the results list
3. attempt to click the link to this biblio's details page; the biblionumber should be blank, leading to a 404

To test solution:
1. Apply patch
2. modify the biblio slightly (click the 005 for example) and save
   OR manually add the biblio to zebraqueue for reindexing
3. after rebuild_zebra.pl -z -b -x runs, use the same search as above. The title should still appear.
4. click the link, and find yourself on the biblio detail page as desired

Signed-off-by: D Ruth Bavousett <ruth@bywatersolutions.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
2011-10-15 13:47:24 +13:00
..
AuthoritiesMarc Bug 5385: POD Cleanups (part 1) 2010-11-12 10:06:55 +13:00
Barcodes Bug 5385 - Fixing an error that crept in with the POD cleanup 2010-11-12 10:42:19 +13:00
Cache Bug 5385: POD Cleanups (part 1) 2010-11-12 10:06:55 +13:00
ClassSortRoutine Bug 4265: Fix padding of short callnumbers and Bib-1 attribute for sorting 2011-03-29 21:54:12 +13:00
Creators bug_6318: Always give predefined fields drop downs on label layout edit 2011-09-16 11:23:59 +12:00
External Bug 5385: POD Cleanups (part 1) 2010-11-12 10:06:55 +13:00
Form Fix for Bug 6458 - incorrect parsing result in translation processing 2011-09-15 08:38:58 +12:00
Heading Bug 5385: POD Cleanups (part 1) 2010-11-12 10:06:55 +13:00
ILSDI Bug 5639 (MT #3605) Fix escaping in ILSDI 2011-08-05 09:07:15 +12:00
Installer Fixing missing padding on module version 2011-07-21 20:04:02 +12:00
Labels bug 5653: use itemcallnumber in bib label layouts 2011-06-13 11:15:34 +12:00
Members Fix for Bug 5436 - Extended patron attributes display improvements 2011-09-23 15:35:54 +12:00
Output Fix FSF address in directory C4/ 2010-03-16 20:17:56 -04:00
Patroncards fixing various links to point to *.koha-community.org 2010-10-21 22:08:24 -04:00
Reports Bug 6755 : Fixing a bug with guided reports 2011-09-27 07:04:02 +13:00
Search Bug 5385: POD Cleanups (part 1) 2010-11-12 10:06:55 +13:00
SIP Bug 3704: SIP Checkin of not checked out item returns error without reason 2011-09-22 19:39:29 +12:00
tests Bug 2505 - Add commented use warnings where missing in the C4/ directory 2010-04-21 20:25:32 +12:00
VirtualShelves Bug 5524 : Cant delete list from the second page of lists 2011-09-01 20:55:16 +12:00
Accounts.pm Bug 3498 [ENH] Allow Partial Payment of Fines 2011-09-13 08:40:49 +12:00
Acquisition.pm Bug 6807 - Add ISBN filter to advanced order search. 2011-10-14 10:57:30 +13:00
Auth.pm Merge remote-tracking branch 'kc/new/bug_5995' into kcmaster 2011-10-15 12:59:34 +13:00
Auth_cas_servers.yaml.orig Bug 5630 CAS improvements 2011-10-13 10:49:49 +13:00
Auth_with_cas.pm Bug 5630 CAS improvements 2011-10-13 10:49:49 +13:00
Auth_with_ldap.pm Merge remote-tracking branch 'kc/new/bug_5995' into kcmaster 2011-10-15 12:59:34 +13:00
AuthoritiesMarc.pm Bug 5737: Modified the merge subroutine in AuthoritiesMarc.pm so it won't destroy the connection to the biblioserver. 2011-08-03 14:01:52 +12:00
BackgroundJob.pm replace references to defunct info email address 2010-06-25 05:18:44 -04:00
Barcodes.pm Bug 5681: Fixes leading zeroes in Add Mulpiple Copies 2011-02-03 10:08:50 +13:00
Biblio.pm Bug 6789: biblios with many items can result in broken search results link 2011-10-15 13:47:24 +13:00
Bookseller.pm Bug5063: C4::Bookseller Changes 2011-03-12 08:42:26 +13:00
Boolean.pm Bug 5448: Refactor Boolean.pm 2010-12-02 08:51:33 +13:00
Branch.pm Bug 5431 : Follow up patch fixing ModBranch 2011-04-12 08:55:20 +12:00
Breeding.pm Fix for Bug 4290 - search for author in repository 2011-03-06 08:22:06 +13:00
Budgets.pm bug_4831: Use unitprice (actual cost) when totalling spent amounts for "All available funds", as in "Already received" 2011-09-22 19:35:40 +12:00
Cache.pm Bug 5363 - Removing unused module (C4::Cache::FastMemcached) 2010-11-04 20:05:36 +13:00
Calendar.pm Fix for Bug 4991, Overhaul of Calendar interface 2010-11-02 15:02:54 +13:00
Category.pm POD Cleanups 2010-06-09 08:38:59 -04:00
Charset.pm bug 5579 : Fixes several exports to embed items 2011-04-19 22:35:15 +12:00
Circulation.pm Enh 6403: Record local use stats when checking in unissued materials 2011-10-09 19:50:41 +13:00
ClassSortRoutine.pm replace references to defunct info email address 2010-06-25 05:18:44 -04:00
ClassSource.pm replace references to defunct info email address 2010-06-25 05:18:44 -04:00
Context.pm Bug 5728: adding note and manager_id fields to accountlines 2011-04-09 21:25:18 +12:00
Contract.pm replace references to defunct info email address 2010-06-25 05:18:44 -04:00
Creators.pm Fix some compile time errors reported in test suite 2010-12-02 08:53:53 +13:00
Csv.pm Bug 2505 - Add commented use warnings where missing in *.pm 2010-04-21 20:28:51 +12:00
Dates.pm Fix for Bug 4473 - Recent comments view for the OPAC 2010-12-13 09:43:01 +13:00
Debug.pm More POD cleanups 2010-06-09 08:38:58 -04:00
Heading.pm Bug 5415 Let calls of SimpleSearch utilize considtent interface 2011-04-08 13:52:57 +12:00
ImportBatch.pm Bug 5859: Allow user to set encoding for import 2011-04-19 13:05:48 +12:00
ImportExportFramework.pm Bug 6723 : import-framework-crlf 2011-08-26 12:46:52 +12:00
Input.pm replace references to defunct info email address 2010-06-25 05:18:44 -04:00
Installer.pm Bug 6537 - squashed version of the previous 5 commits, signed-off 2011-09-07 09:19:07 +12:00
ItemCirculationAlertPreference.pm POD Cleanups 2010-06-09 08:38:59 -04:00
Items.pm Bug 6885 Follow up to fix superlibarian permission check 2011-10-13 15:54:48 +13:00
ItemType.pm Bug 6371 Item Types description not properly displayed if not pure ASCII 2011-10-08 20:10:29 +13:00
Koha.pm Merge remote branch 'kc/new/pending_qa/enh/bug_3644' into kcmaster 2011-04-09 19:16:45 +12:00
Labels.pm Bringing label, patroncard, and creator modules into conformity with the rest of C4 style. 2010-02-08 20:54:34 -05:00
Languages.pm Bug 6755 Web browser default lang != syspref selected langs 2011-09-26 23:26:09 +13:00
Letters.pm Bug 5263 - Add support for including fields from the ISSUES table in advanced due notices 2011-08-02 12:44:42 +12:00
Log.pm Bug 6460: alternative fix, updating template and script instead of C4::Log 2011-09-24 10:01:09 +12:00
Maintainance.pm replace references to defunct info email address 2010-06-25 05:18:44 -04:00
Matcher.pm Bug 5415 Let calls of SimpleSearch utilize considtent interface 2011-04-08 13:52:57 +12:00
Members.pm Bug 6667 Correct documentation of function 2011-10-09 20:24:04 +13:00
Message.pm POD Cleanups 2010-06-09 08:38:59 -04:00
NewsChannels.pm Fix FSF address in directory C4/ 2010-03-16 20:17:56 -04:00
Output.pm Bug 6755 follow up, fixing broken POD 2011-09-23 11:33:00 +12:00
Overdues.pm Bug 6927-- Typo in C4::Overdues.pm 2011-09-28 09:24:17 +13:00
Patroncards.pm Fix some compile time errors reported in test suite 2010-12-02 08:53:53 +13:00
Print.pm replace references to defunct info email address 2010-06-25 05:18:44 -04:00
Record.pm Bug 5453 : Move declarations out of conditionals 2011-07-15 15:50:24 +12:00
Reports.pm More POD cleanups 2010-06-09 08:38:58 -04:00
Reserves.pm Bug 5528: Analytic records support 2011-10-13 10:03:39 +13:00
Review.pm Fix for Bug 4473 - Recent comments view for the OPAC 2010-12-13 09:43:01 +13:00
Ris.pm bug 5780 followup: RIS export now includes all URLs 2011-10-14 10:37:31 +13:00
RotatingCollections.pm Fix some compile time errors reported in test suite 2010-12-02 08:53:53 +13:00
Scheduler.pm POD Cleanups 2010-06-09 08:38:59 -04:00
Scrubber.pm Bug 5611: Simple typo fix in the comments 2011-01-13 08:17:27 +13:00
Search.pm Bug 5528: Analytic records support 2011-10-13 10:03:39 +13:00
Serials.pm Bug 6315: Fix depreciated constructions in C4::Serials 2011-05-15 20:42:08 +12:00
Service.pm POD Cleanups 2010-06-09 08:38:59 -04:00
ShelfBrowser.pm Bug 5551 - allow shelf browser filters to be changed 2011-01-21 11:08:42 +13:00
SMS.pm More POD cleanups 2010-06-09 08:38:58 -04:00
SQLHelper.pm Bug 6017 : MT3157 : editing an attribute lead to Error500 2011-04-08 14:14:32 +12:00
Stats.pm replace references to defunct info email address 2010-06-25 05:18:44 -04:00
Suggestions.pm Bug 5947 Suggestions : add date to the search query 2011-04-05 11:06:28 +12:00
Tags.pm More POD cleanups 2010-06-09 08:38:58 -04:00
Templates.pm Bug 6840 warning in logs 2011-10-13 16:17:33 +13:00
TmplToken.pm Bug 6458 Template Toolkit files test case 2011-08-18 21:11:50 +12:00
TmplTokenType.pm Bug 6458 Template Toolkit files test case 2011-08-18 21:11:50 +12:00
TTParser.pm Bug 6458 Template Toolkit files test case 2011-08-18 21:11:50 +12:00
UploadedFile.pm replace references to defunct info email address 2010-06-25 05:18:44 -04:00
Utils.pm Big LDAP changes, module test for Context.pm, still more yet to come. 2007-12-04 17:27:06 -06:00
VirtualShelves.pm Bug 6555 : only 10 lists show in the staff client 2011-09-07 09:00:38 +12:00
XISBN.pm Fix for Bug 5570 - item types not showing on other editions 2011-01-07 14:18:09 +13:00
XSLT.pm Bug 6755 Problems with switching languages 2011-09-23 09:47:09 +12:00
Z3950.pm fixing various links to point to *.koha-community.org 2010-10-21 22:08:24 -04:00