Bug 8818 - Authority linker error on Z cataloging
Summary: Authority linker error on Z cataloging
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: 3.10
Hardware: All All
: P1 - high blocker (vote)
Assignee: Galen Charlton
QA Contact: Mason James
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-09-25 14:05 UTC by Nicole C. Engard
Modified: 2019-06-27 09:24 UTC (History)
5 users (show)

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


Attachments
Bug 8818: make sure we load modules before using them (2.63 KB, patch)
2012-09-25 23:41 UTC, Jared Camins-Esakov
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 8818: make sure we load modules before using them (2.70 KB, patch)
2012-09-26 00:29 UTC, Nicole C. Engard
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nicole C. Engard 2012-09-25 14:05:21 UTC
I was cataloging a new book today. I followed these steps:

1. Z39 search of LOC
2. Choose title
3. Add summary 520
4. Add url 856
5. Choose authority for author 100
6. Hit save

I got this error:

Software error:

Can't locate object method "new" via package "C4::Linker::FirstMatch" (perhaps you forgot to load "C4::Linker::FirstMatch"?) at /home/nengard/kohaclone/C4/Biblio.pm line 503.

For help, please send mail to the webmaster (webmaster@debian), giving this error message and the time and date of the error.
Comment 1 Nicole C. Engard 2012-09-25 14:07:29 UTC
I tried again skipping steps 3-5 and still get the same error.
Comment 2 Nicole C. Engard 2012-09-25 14:09:12 UTC
Finally I changed my linker settings and just got a different error:

Software error:

Can't locate object method "new" via package "C4::Linker::Default" (perhaps you forgot to load "C4::Linker::Default"?) at /home/nengard/kohaclone/C4/Biblio.pm line 503.

For help, please send mail to the webmaster (webmaster@debian), giving this error message and the time and date of the error.
Comment 3 Jared Camins-Esakov 2012-09-25 23:41:09 UTC Comment hidden (obsolete)
Comment 4 Nicole C. Engard 2012-09-26 00:29:42 UTC
Created attachment 12512 [details] [review]
[SIGNED-OFF] Bug 8818: make sure we load modules before using them

An eval { eval "require $module;" }; was replaced with
eval { eval { require $module; }; }; which is a no-op, meaning that
the linker was not getting loaded, and the catalog module was throwing
up a big nasty error every time someone tried to save a record with a
heading. This patch replaces the require with can_load from
Module::Load::Conditional, which is PBP-friendly, and offers equivalent
functionality.

Signed-off-by: Nicole C. Engard <nengard@bywatersolutions.com>
Comment 5 Mason James 2012-09-30 23:31:41 UTC
(In reply to comment #4)
> Created attachment 12512 [details] [review]
> [SIGNED-OFF] Bug 8818: make sure we load modules before using them
 
patch looks good, passing QA

$ koha-qa.pl  -c 1 

testing 1 commit(s) (applied to commit eb6effd)
 * 0a60190 Bug 8818: make sure we load modules before using them
      C4/Biblio.pm
      misc/link_bibs_to_authorities.pl

* C4/Biblio.pm                                                             OK
* misc/link_bibs_to_authorities.pl                                         OK
Comment 6 Nicole C. Engard 2012-10-01 14:05:05 UTC
updating severity since I can't catalog at all until this is pushed.
Comment 7 Paul Poulain 2012-10-01 17:10:40 UTC
Patch pushed to master
Comment 8 Chris Cormack 2013-04-20 23:13:16 UTC
Released in 3.10.0