Bug 6829 - Remove two warnings for opac-MARCdetail
Summary: Remove two warnings for opac-MARCdetail
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: 3.6
Hardware: All All
: P5 - low minor
Assignee: Marcel de Rooy
QA Contact: Ian Walls
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-01 12:35 UTC by Marcel de Rooy
Modified: 2013-12-05 19:53 UTC (History)
4 users (show)

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


Attachments
Patch (6.62 KB, patch)
2011-09-01 12:36 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Patch (1.63 KB, patch)
2011-09-01 12:38 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Revised patch (2.13 KB, patch)
2011-09-01 13:05 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Revised patch improved (2.14 KB, patch)
2011-09-01 13:08 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Signed-off patch (2.19 KB, patch)
2011-09-01 13:13 UTC, Owen Leonard
Details | Diff | Splinter Review
Follow up patch (1.15 KB, patch)
2011-12-27 10:19 UTC, Frédéric Demians
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 6829 Follow up patch (1.42 KB, patch)
2012-01-04 06:49 UTC, Katrin Fischer
Details | Diff | Splinter Review
Second follow up (1.90 KB, patch)
2012-01-05 13:57 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Marcel de Rooy 2011-09-01 12:35:33 UTC
Remove this warning by adding a check: 
[Thu Sep 01 14:20:18 2011] [error] [client 192.87.126.61] [Thu Sep  1 14:20:18 2011] opac-MARCdetail.pl: Use of uninitialized value in string ne at /usr/share/koha/testclone/opac/opac-MARCdetail.pl line 145., referer: http://libdevelop.rijksmuseum.nl:8008/cgi-bin/koha/opac-detail.pl?biblionumber=144200

And this warning:
[Mon Aug 29 13:58:02 2011] [error] [client 66.249.72.86] [Mon Aug 29 13:58:02 2011] opac-MARCdetail.pl: Use of uninitialized value in string comparison (cmp) at /usr/share/koha/prodclone/opac/opac-MARCdetail.pl line 238.
This warning is still generated in 3.3.0.12, but could be resolved in 3.5 with the removing of 952 from marcxml. The check does not hurt however.
Comment 1 Marcel de Rooy 2011-09-01 12:36:59 UTC Comment hidden (obsolete)
Comment 2 Marcel de Rooy 2011-09-01 12:38:01 UTC Comment hidden (obsolete)
Comment 3 Marcel de Rooy 2011-09-01 12:41:31 UTC
Test:
Check your logfile for the error on line 145. After you applied the patch, run opac-MARCdetail again for that record; you should not receive the warning again in the logfile for that biblionumber.
Comment 4 Owen Leonard 2011-09-01 12:52:39 UTC
Still getting one error in the log:

opac-MARCdetail.pl: Use of uninitialized value in string ne at /kohaclone/opac/opac-MARCdetail.pl line 218.
Comment 5 Marcel de Rooy 2011-09-01 13:05:30 UTC Comment hidden (obsolete)
Comment 6 Marcel de Rooy 2011-09-01 13:08:23 UTC Comment hidden (obsolete)
Comment 7 Owen Leonard 2011-09-01 13:13:44 UTC Comment hidden (obsolete)
Comment 8 Chris Cormack 2011-09-14 10:23:06 UTC
Simple fix to remove warns, pushed
Comment 9 Chris Nighswonger 2011-10-26 18:02:11 UTC
The fix for this bug was published in the 3.4.5 release. If you were the reporter of this bug, please take time to verify the fix and update the status of this bug report accordingly. If the bug is fixed to your satisfaction, please close this report.
Comment 10 Frédéric Demians 2011-12-27 09:26:16 UTC
With this patch, opac-MARCdetail.pl doesn't display anymore subfields
which 'hidden' parameter is set to 0. Reverting this patch solves the
issue. But I will send a follow-up patch.
Comment 11 Frédéric Demians 2011-12-27 10:19:58 UTC Comment hidden (obsolete)
Comment 12 Katrin Fischer 2012-01-04 06:49:21 UTC
Created attachment 7035 [details] [review]
[SIGNED-OFF] Bug 6829 Follow up patch

To reproduce the bug:

- Open OPAC MARC View for a specific biblio record
- Fields which are affected to tab 0 are all hidden

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Patch fixes bug for 0xx fields in OPAC MARC view.
Note: the problem only exists for 0xx fields with real subfields,
control fields display correctly, fields like 040 only display
after patch was applied.
Comment 13 Ian Walls 2012-01-05 13:03:51 UTC
Simple one line change, replacing a '' with 0 (which is more explicitly correct in this case) and ne with !=.  Marking as Passed QA
Comment 14 Marcel de Rooy 2012-01-05 13:05:15 UTC
(In reply to comment #13)
> Simple one line change, replacing a '' with 0 (which is more explicitly correct
> in this case) and ne with !=.  Marking as Passed QA

There is still a possible issue here (a 952 subfield). Was just looking at it.
Comment 15 Marcel de Rooy 2012-01-05 13:57:32 UTC
Created attachment 7051 [details] [review]
Second follow up

Needed this second follow up to remove 952-0 from the display again, coming up after the first follow up.
Changed a second test in accordance with first follow up.
Removed a useless 10th loop to create a tab10XX that is not in the template.

Took the liberty to sign it off myself. Small change but annoying to find.
Comment 16 Marcel de Rooy 2012-01-05 13:59:12 UTC
Ian,
If you could have a second look please. Thanks and sorry for the inconvenience..
Comment 17 Ian Walls 2012-01-21 17:30:42 UTC
Followup patch is straightforward change to loop size, and uses 'defined' versus variable evaluation to handle 0 case.  Marking as Passed QA