Bug 12861 - Noisy warns in C4/AuthoritiesMarc.pm
Summary: Noisy warns in C4/AuthoritiesMarc.pm
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor
Assignee: Chris Cormack
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-09-02 22:05 UTC by Chris Cormack
Modified: 2015-12-03 22:02 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
Bug 12861 : Noisy warn in the error logs (5.54 KB, patch)
2014-09-02 22:06 UTC, Chris Cormack
Details | Diff | Splinter Review
Bug 12861 : Noisy warn in the error logs (4.82 KB, patch)
2014-10-27 05:41 UTC, Chris Cormack
Details | Diff | Splinter Review
Bug 12861 : Noisy warn in the error logs (5.01 KB, patch)
2015-01-15 13:45 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 12861: (follow-up) Noisy warn in error logs (1.57 KB, patch)
2015-01-15 14:20 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 12861: (follow-up) Noisy warn in error logs (1.67 KB, patch)
2015-01-19 07:38 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 12861 : Noisy warn in the error logs (5.03 KB, patch)
2015-01-19 09:37 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 12861: (follow-up) Noisy warn in error logs (1.69 KB, patch)
2015-01-19 09:37 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Cormack 2014-09-02 22:05:31 UTC
If you hit a url like 
cgi-bin/koha/opac-authorities-home.pl?op=do_search&type=opac&operatorc=contains&marclistc=mainentry&and_orc=and&orderby=HeadingAsc&value=FIRECLAY

You will see a lot of this

opac-authorities-home.pl: Use of uninitialized value in string eq at /usr/share/koha/lib/C4/AuthoritiesMarc.pm line 146, <DATA> line 522.

In the error logs
Comment 1 Chris Cormack 2014-09-02 22:06:23 UTC Comment hidden (obsolete)
Comment 2 Marcel de Rooy 2014-10-06 13:31:01 UTC
-            else { # Assume any if no index was specified
-                $attr = " \@attr 1=Any ";
-            }

From glancing thru this code:
The place of this else in the old code and in the new code is different.
In the new code you are not reaching this point anymore.
Comment 3 Chris Cormack 2014-10-27 05:41:52 UTC Comment hidden (obsolete)
Comment 4 Marcel de Rooy 2015-01-15 13:45:45 UTC Comment hidden (obsolete)
Comment 5 Marcel de Rooy 2015-01-15 13:54:33 UTC
opac-authorities-home.pl: Use of uninitialized value $i in string eq at /usr/share/koha/testclone/C4/AuthoritiesMarc.pm line 172.
opac-authorities-home.pl: Use of uninitialized value $i in string eq at /usr/share/koha/testclone/C4/AuthoritiesMarc.pm line 176.
opac-authorities-home.pl: Use of uninitialized value $i in string eq at /usr/share/koha/testclone/C4/AuthoritiesMarc.pm line 179.
opac-authorities-home.pl: Use of uninitialized value $i in string eq at /usr/share/koha/testclone/C4/AuthoritiesMarc.pm line 183.
Comment 6 Jonathan Druart 2015-01-15 14:20:49 UTC Comment hidden (obsolete)
Comment 7 Jonathan Druart 2015-01-15 14:21:48 UTC
Could I get a signoff on the second patch please?
Comment 8 Marcel de Rooy 2015-01-19 07:38:38 UTC Comment hidden (obsolete)
Comment 9 Jonathan Druart 2015-01-19 09:37:05 UTC
Created attachment 35364 [details] [review]
Bug 12861 : Noisy warn in the error logs

To test
Hit a url like
cgi-bin/koha/opac-authorities-home.pl?op=do_search&type=opac&operatorc=contains&marclistc=mainentry&and_orc=and&orderby=HeadingAsc&value=FIRECLAY

Notice the warns in the error log
Apply patch
Reload the url
Still works but no warns

(cherry picked from commit c98d805e490a82b2ea9f3d4e0f7278640942ba6d)
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>

Reformatted to fix error M Tompsett spotted

Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Instead of 10 warnings, I now have only 4 warnings.
We're going in the right direction.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Comment 10 Jonathan Druart 2015-01-19 09:37:11 UTC
Created attachment 35365 [details] [review]
Bug 12861: (follow-up) Noisy warn in error logs

Completely get rid of warns.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Comment 11 Tomás Cohen Arazi (tcohen) 2015-01-21 14:11:11 UTC
Patches pushed to master.

Thanks Chris and Jonathan!
Comment 12 Chris Cormack 2015-02-01 03:35:40 UTC
Pushed to 3.18.x will be in 3.18.4
Comment 13 Mason James 2015-02-26 02:48:43 UTC
(In reply to Chris Cormack from comment #12)
> Pushed to 3.18.x will be in 3.18.4

Pushed to 3.16.x, will be in 3.16.8