[Bug 41864] New: Simple OPAC search generates warnings: Odd number of elements in anonymous hash
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41864 Bug ID: 41864 Summary: Simple OPAC search generates warnings: Odd number of elements in anonymous hash Initiative type: --- Sponsorship --- status: Product: Koha Version: unspecified Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: januszop@gmail.com QA Contact: testopia@bugs.koha-community.org CC: tomascohen@gmail.com Depends on: 40966 After introducing Bug 40966 opac-search.pl, when invoked in the simple form (not as advanced search) generates warnings like: [WARN] Odd number of elements in anonymous hash at /kohadevbox/koha/opac/opac-search.pl line 529. This is because 'weight_search_submitted' is not initialized for this search. You get the same effect with this simple test: #!/usr/bin/perl use Modern::Perl; use Data::Dumper; say Dumper( { one => 1, two => &und } ); sub und { #return undef; } But if you uncomment 'return undef', there is no warning. So most probably, in this case, $cgi->param('weight_search_submitted') returns an empty list, not an undef. Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40966 [Bug 40966] 'whole_record' and 'weighted_fields' not passed around -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41864 Janusz Kaczmarek <januszop@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41864 --- Comment #1 from Janusz Kaczmarek <januszop@gmail.com> --- Created attachment 193341 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=193341&action=edit Bug 41864: (Bug 40966 follow-up) Simple OPAC search generates warnings: Odd number of elements in anonymous hash After introducing Bug 40966 opac-search.pl, when invoked in the simple form (not as advanced search) generates warnings like: [WARN] Odd number of elements in anonymous hash at /kohadevbox/koha/opac/opac-search.pl line 529. Test plan: ========== 1. Perform a simple search from main OPAC page. 2. Check the content of plack-opac-error.log. You should see a warning like: [WARN] Odd number of elements in anonymous hash at /kohadevbox/koha/opac/opac-search.pl line 529. 3. Apply the patch ; restart_all. 4. Repeat p. 1. There should be no new warning now. Sponsored-by: Ignatianum University in Cracow -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41864 Janusz Kaczmarek <januszop@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Simple OPAC search |(Bug 40966 follow-up) |generates warnings: Odd |Simple OPAC search |number of elements in |generates warnings: Odd |anonymous hash |number of elements in | |anonymous hash Sponsorship status|--- |Sponsored -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41864 Roman Dolny <roman.dolny@jezuici.pl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41864 Roman Dolny <roman.dolny@jezuici.pl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #193341|0 |1 is obsolete| | --- Comment #2 from Roman Dolny <roman.dolny@jezuici.pl> --- Created attachment 193362 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=193362&action=edit Bug 41864: (Bug 40966 follow-up) Simple OPAC search generates warnings: Odd number of elements in anonymous hash After introducing Bug 40966 opac-search.pl, when invoked in the simple form (not as advanced search) generates warnings like: [WARN] Odd number of elements in anonymous hash at /kohadevbox/koha/opac/opac-search.pl line 529. Test plan: ========== 1. Perform a simple search from main OPAC page. 2. Check the content of plack-opac-error.log. You should see a warning like: [WARN] Odd number of elements in anonymous hash at /kohadevbox/koha/opac/opac-search.pl line 529. 3. Apply the patch ; restart_all. 4. Repeat p. 1. There should be no new warning now. Sponsored-by: Ignatianum University in Cracow Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41864 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |martin.renvoize@openfifth.c |y.org |o.uk CC| |martin.renvoize@openfifth.c | |o.uk Assignee|koha-bugs@lists.koha-commun |januszop@gmail.com |ity.org | -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41864 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Comma delimited| |Ignatianum University in list of Sponsors| |Cracow Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41864 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #193362|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41864 --- Comment #3 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 193610 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=193610&action=edit Bug 41864: (Bug 40966 follow-up) Simple OPAC search generates warnings: Odd number of elements in anonymous hash After introducing Bug 40966 opac-search.pl, when invoked in the simple form (not as advanced search) generates warnings like: [WARN] Odd number of elements in anonymous hash at /kohadevbox/koha/opac/opac-search.pl line 529. Test plan: ========== 1. Perform a simple search from main OPAC page. 2. Check the content of plack-opac-error.log. You should see a warning like: [WARN] Odd number of elements in anonymous hash at /kohadevbox/koha/opac/opac-search.pl line 529. 3. Apply the patch ; restart_all. 4. Repeat p. 1. There should be no new warning now. Sponsored-by: Ignatianum University in Cracow Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> Signed-off-by: Martin Renvoize <martin.renvoize@openfifth.co.uk> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41864 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |26.05.00 released in| | Status|Passed QA |Pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41864 --- Comment #4 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Nice work everyone! Pushed to main for 26.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41864 Jacob O'Mara <jacob.omara@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|26.05.00 |26.05.00,25.11.04 released in| | Status|Pushed to main |Pushed to stable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41864 --- Comment #5 from Jacob O'Mara <jacob.omara@openfifth.co.uk> --- Thanks all, pushed to 25.11.x -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org