Bug 6912

Summary: OPAC display crashes for analytical biblio without 008 field
Product: Koha Reporter: Frédéric Demians <f.demians>
Component: OPACAssignee: Frédéric Demians <f.demians>
Status: CLOSED FIXED QA Contact: Bugs List <koha-bugs>
Severity: normal    
Priority: PATCH-Sent (DO NOT USE) CC: chris, jcamins, koha.sekjal, paul.poulain
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Proposed patch
Proposed patch
Proposed patch
[SIGNED-OFF] Bug 6912 Test 008 presence in get CoinS function
Bug 6912 Test 008 presence in get CoinS function

Description Frédéric Demians 2011-09-25 09:35:52 UTC
If CoinS is enabled, OPAC display crashes when displaying analytical biblio records which have not 008 field. 

To test:

- Create a analytical biblio record (leader pos 6 = 'a'), without 008 field
- In OPAC, display this biblio
Comment 1 Frédéric Demians 2011-09-25 09:38:47 UTC Comment hidden (obsolete)
Comment 2 Frédéric Demians 2011-09-25 17:44:17 UTC Comment hidden (obsolete)
Comment 3 Frédéric Demians 2011-09-25 18:01:04 UTC Comment hidden (obsolete)
Comment 4 Jared Camins-Esakov 2011-10-08 16:40:38 UTC
I cannot duplicate this bug. Or if I am duplicating it, I can't tell. What are the symptoms?
Comment 5 Frédéric Demians 2011-10-08 19:51:21 UTC
> I cannot duplicate this bug. Or if I am duplicating it, I can't tell. What are
> the symptoms?

Thanks for testing.

How to reproduce this bug, and test the patch:

  - In OPAC, go on a biblio record detail page. Note its biblionumber.
  - In another browser tab, go in staff interface, edit the previous
    MARC21 biblio record.
  - Open the leader editor.
  - In 7- Bibliographic level, choose 'a - Monographic component part'
  - Click OK, and save the the biblio record.
  - Switch to the OPAC tab. Refresh the page. You get this error
    message:

    Software error:

    Can't call method "data" on an undefined value at
    /home/tamil/client/lesc/kohaclone/C4/Biblio.pm line 1220.
Comment 6 Frédéric Demians 2011-10-08 19:53:28 UTC
Sorry, I forgot something. When editing the biblio record leader, you
also have to remove the 008 field if you have one.
Comment 7 Jared Camins-Esakov 2011-10-08 20:00:13 UTC Comment hidden (obsolete)
Comment 8 Jared Camins-Esakov 2011-10-08 20:02:23 UTC
I see. There is no case when a record should be without an 008, but, since it surely happens, this is very real issue. The patch works exactly as you said.
Comment 9 Paul Poulain 2011-10-12 15:51:24 UTC
Created attachment 5859 [details] [review]
Bug 6912 Test 008 presence in get CoinS function

Signed-off-by: Jared Camins-Esakov <jcamins@cpbibliography.com>
Signed-off-by: Paul Poulain <paul.poulain@biblibre.com>
Comment 10 Paul Poulain 2011-10-12 15:52:38 UTC
QA comment :
  * trivial patch & good coding style
  * good description
  * works as announced

passed QA
Comment 11 Ian Walls 2011-10-12 20:08:27 UTC
Yup, straight forward patch, easy to read, agreed on passed QA
Comment 12 Chris Cormack 2011-10-13 02:58:24 UTC
No strings changed, pushing
Comment 13 Jared Camins-Esakov 2012-12-31 00:20:59 UTC
There have been no further reports of problems so I am marking this bug resolved.