Bug 9070 - Searching for authority from tag editor for field 650 gives error
Summary: Searching for authority from tag editor for field 650 gives error
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: MARC Authority data support (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Galen Charlton
QA Contact:
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-11-13 15:45 UTC by Magnus Enger
Modified: 2013-05-23 06:24 UTC (History)
3 users (show)

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


Attachments
Bug 9070: authority searches in auth_finder error out (1.93 KB, patch)
2012-11-13 16:05 UTC, Jared Camins-Esakov
Details | Diff | Splinter Review
Bug 9070: [SIGNED-OFF] authority searches in auth_finder error out (2.01 KB, patch)
2012-11-13 16:18 UTC, Magnus Enger
Details | Diff | Splinter Review
Bug 9070: authority searches in auth_finder error out (1.71 KB, patch)
2012-11-13 16:51 UTC, Jared Camins-Esakov
Details | Diff | Splinter Review
Bug 9070: [SIGNED-OFF] authority searches in auth_finder error out (1.86 KB, patch)
2012-11-13 16:58 UTC, Magnus Enger
Details | Diff | Splinter Review
Bug 9070: [SIGNED-OFF] authority searches in auth_finder error out (1.92 KB, patch)
2012-11-20 14:35 UTC, Paul Poulain
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Magnus Enger 2012-11-13 15:45:37 UTC
Searching for autorities in "Home › Authorities" works fine but doing the same search in the tag editor for the 650 field (marc21) gives this error: 

Can't use string ("HASH(0xbc6c{30)") as a HASH ref while "strict refs" in use at /usr/share/koha/lib/C4/AuthoritiesMarc.pm line 363.

Here's the URL of the page showing the error:

http://example.com:8080/cgi-bin/koha/authorities/auth_finder.pl?op=do_search&type=intranet&index=tag_650_subfield_a_214074_10477&authtypecode=TOPIC_TERM&marclist=mainmainentry&and_or=and&operator=contains&value_mainstr=Common+Cold+&marclist=mainentry&and_or=and&operator=contains&marclist=any&and_or=and&operator=contains&marclist=match&and_or=and&operator=contains&orderby=HeadingAsc
Comment 1 Jared Camins-Esakov 2012-11-13 16:05:44 UTC Comment hidden (obsolete)
Comment 2 Magnus Enger 2012-11-13 16:18:47 UTC Comment hidden (obsolete)
Comment 3 Jared Camins-Esakov 2012-11-13 16:51:14 UTC Comment hidden (obsolete)
Comment 4 Magnus Enger 2012-11-13 16:58:11 UTC Comment hidden (obsolete)
Comment 5 Paul Poulain 2012-11-20 14:35:47 UTC
QA comment :
 * passes koha-qa.pl
 * works as advertised
 * no string changes

passed QA
Comment 6 Paul Poulain 2012-11-20 14:35:57 UTC
Created attachment 13553 [details] [review]
Bug 9070: [SIGNED-OFF] authority searches in auth_finder error out

When using authority records imported into Koha from elsewhere, you
can get an error like:
    Can't use string ("HASH(0xbc6c{30)") as a HASH ref while "strict refs" in use at /usr/share/koha/lib/C4/AuthoritiesMarc.pm line 363.
in authorities/auth_finder.pl. This patch fixes that error.

To test:
1) You will need records imported from elsewhere.
2) Use the authority control plugin in a bib record to search for one of
   those headings.
3) Observe you get a nasty error.
4) Apply patch.
5) Repeat step 2.
6) Observe the error is gone.
7) Sign off.

Signed-off-by: Magnus Enger <magnus@enger.priv.no>
Works as advertised. No warning about "defined(%hash) is deprecated"
under perl v5.10.1.

Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Comment 7 Jared Camins-Esakov 2012-11-20 19:22:10 UTC
This patch has been pushed to master.
Comment 8 Chris Cormack 2012-11-26 00:06:17 UTC
This patch is in 3.10.x and 3.8.x (was in 3.10.0 release will be 3.8.8)