Bug 9149 - Patch 8823 introduces reference to non-existent function
Summary: Patch 8823 introduces reference to non-existent function
Alias: None
Product: Koha
Classification: Unclassified
Component: MARC Authority data support (show other bugs)
Version: 3.8
Hardware: All All
: P3 critical (vote)
Assignee: Galen Charlton
QA Contact:
Depends on:
Reported: 2012-11-26 23:14 UTC by Doug Kingston
Modified: 2019-06-27 09:24 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Text to go in the release notes:
Version(s) released in:

Bug 9149: Add missing GetAuthorizedHeading (3.98 KB, patch)
2012-11-29 20:19 UTC, Jared Camins-Esakov
Details | Diff | Splinter Review
[SIGNED-OFF] [3.8.x] Bug 9149: Add missing GetAuthorizedHeading (4.13 KB, patch)
2012-11-29 22:08 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Doug Kingston 2012-11-26 23:14:50 UTC
This patch appears to break koha 3.8.7.  The routine GetAuthorizedHeading called in Biblio.pm, or more precisely C4::AuthoritiesMarc::GetAuthorizedHeading does not exist anywhere in the source.
This breaks link_bibs_to_authorities.pl and possibly other things.
Comment 1 jane.chang 2012-11-29 18:36:42 UTC
I think I have a similar problem.  Cannot edit/replace/create records.  The following error appeared when trying to save:

Undefined subroutine &C4::AuthoritiesMarc::GetAuthorizedHeading called at /usr/share/koha/lib/C4/Biblio.pm line 667.

Please help resolve.
Comment 2 jane.chang 2012-11-29 19:15:57 UTC
Just got a solution from KOHA maintenance.  
Go to system preferences and look under authorities tab.
Turn "AutoCreateAuthoritie" to "do not generate".
This fixed my problem, and hopefully it will fix yours.  
In the meantime, they will fix the bug for the next update.  You can turn it back on after it's fixed.
Comment 3 Chris Cormack 2012-11-29 19:57:53 UTC
216251e52467cfa3540f16c816ba94c5c0bd499d is the first bad commit
Comment 4 Jared Camins-Esakov 2012-11-29 20:19:21 UTC Comment hidden (obsolete)
Comment 5 Chris Cormack 2012-11-29 20:57:29 UTC
Could I please get a signoff on this as soon as possible.
Comment 6 Katrin Fischer 2012-11-29 22:08:47 UTC
Created attachment 13792 [details] [review]
[SIGNED-OFF] [3.8.x] Bug 9149: Add missing GetAuthorizedHeading

On 3.8.x, it was possible for multiple automatically generated
authorities to be linked to a single heading. This patch deletes
previous links from headings prior to linking them to
automatically-generated headings. This patch also corrects a
potential problem wherein multiple authorities might be generated if
a record is edited repeatedly in quick succession. The latter problem
exists on Master and 3.6.x as well, and the code that corrects the
multiple linkages is equally applicable if seemingly unnecessary.

This patch adds a missing routine to C4::AuthoritiesMarc that should
have been in the 3.8.x version of the patch for bug 8823.

To test:
1) Turn on BiblioAddsAuthorities and AutoCreateAuthorities.
2) Create a new record or edit an existing one, and add an
   authority-controlled heading (for example, MARC21 1xx or 6xx or
   UNIMARC 6xx or 7xx) which does not currently exist in your authority
3) If you don't get a software error, it worked.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
For 2) you can also download a record over Z39.50.
Passes all tests.
Comment 7 Doug Kingston 2012-12-02 00:57:21 UTC
I can confirm that this patch fixes the issue and life is more wonderful.  :-)
Thanks for the quick response.
Comment 8 Chris Cormack 2012-12-02 06:16:31 UTC
Pushed to 3.8.x, will be in 3.8.8