[Bug 35792] New: Quiet warning: Use of uninitialized value $sub6
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35792 Bug ID: 35792 Summary: Quiet warning: Use of uninitialized value $sub6 Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: trivial Priority: P5 - low Component: Searching - Elasticsearch Assignee: koha-bugs@lists.koha-community.org Reporter: magnus@libriotech.no When reindexing Elasticsearch, this warning can sometimes be seen: Use of uninitialized value $sub6 in pattern match (m//) at /usr/share/koha/lib/Koha/SearchEngine/Elasticsearch.pm line 601. This warning is from 23.05.06. In master it looks like the relevant line is now line 603. I think it could be silenced by changing the line from this: if ($sub6 =~ /^(...)-\d+/) { to this: if ($sub6 && $sub6 =~ /^(...)-\d+/) { -- 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=35792 Magnus Enger <magnus@libriotech.no> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |Academy -- 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=35792 Koha Training Catalyst <koha-training@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- 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=35792 --- Comment #1 from Koha Training Catalyst <koha-training@catalyst.net.nz> --- Created attachment 169619 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=169619&action=edit Bug 35792: Use of uninitialized value $sub6 Test plan: 1. Rerun and make sure the error "Use of uninitialized value $sub6 in pattern match (m//) at /usr/share/koha/lib/Koha/SearchEngine/Elastricsearch.pm" is no longer present. -- 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=35792 Chris Cormack <chris@bigballofwax.co.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #169619|0 |1 is obsolete| | --- Comment #2 from Chris Cormack <chris@bigballofwax.co.nz> --- Created attachment 169622 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=169622&action=edit Bug 35792: Use of uninitialized value $sub6 Test plan: 1. Apply patch 2. Rerun and make sure the error "Use of uninitialized value $sub6 in pattern match (m//) at /usr/share/koha/lib/Koha/SearchEngine/Elastricsearch.pm" is no longer present. Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Initial testing done, it works well, needs an additional sign off from an external party -- 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=35792 Yvonne Waterman <yvonnewaterman@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |yvonnewaterman@catalyst.net | |.nz Assignee|koha-bugs@lists.koha-commun |yvonnewaterman@catalyst.net |ity.org |.nz -- 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=35792 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com --- Comment #3 from David Nind <david@davidnind.com> --- I tried to replicate the issue, but didn't see it in the output from reindexing (koha-elasticsearch --rebuild -d -b -a kohadev). Does this require a record with an incorrect value in 880$6 (880 = Alternate Graphic Representation, $6 = Linkage) for this warning to appear? I'm not familiar enough with this field, or what is checked for, to add an incorrect (or correct) value. (Sometime/most of the time, some MARC21 tags and subfields are a bit obtuse for me to understand - https://www.loc.gov/marc/bibliographic/bd880.html 8-).) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35792 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au --- Comment #4 from David Cook <dcook@prosentient.com.au> --- (In reply to David Nind from comment #3)
Does this require a record with an incorrect value in 880$6 (880 = Alternate Graphic Representation, $6 = Linkage) for this warning to appear?
It looks like a record with a 880 but no $6. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35792 --- Comment #5 from David Nind <david@davidnind.com> --- (In reply to David Cook from comment #4)
(In reply to David Nind from comment #3)
Does this require a record with an incorrect value in 880$6 (880 = Alternate Graphic Representation, $6 = Linkage) for this warning to appear?
It looks like a record with a 880 but no $6.
Thanks David! That works - I can now replicate the issue! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35792 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35792 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #169622|0 |1 is obsolete| | --- Comment #6 from David Nind <david@davidnind.com> --- Created attachment 169804 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=169804&action=edit Bug 35792: Use of uninitialized value $sub6 Test plan: 1. Apply patch 2. Rerun and make sure the error "Use of uninitialized value $sub6 in pattern match (m//) at /usr/share/koha/lib/Koha/SearchEngine/Elastricsearch.pm" is no longer present. Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Initial testing done, it works well, needs an additional sign off from an external party Signed-off-by: David Nind <david@davidnind.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35792 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Text to go in the| |This removes a warning release notes| |message[1] that appears in | |the reindexing output when | |using Elasticsearch. The | |warning was generated if | |there was no value in 880$6 | |(880 = Alternate Graphic | |Representation, $6 = | |Linkage), but there were | |other 880 subfields with a | |value, for example 880$a. | | | |[1] Use of uninitialized | |value $sub6 in pattern | |match (m//) at | |/kohadevbox/koha/Koha/Searc | |hEngine/Elasticsearch.pm | |line 619. --- Comment #7 from David Nind <david@davidnind.com> --- Testing notes (using koha-testing-docker (KTD)): 1. Start up KTD with Elasticsearch (7 or 8): ktd --es7 up 2. Edit the book framework so that 880$a and $880$6 are visible in the staff interface (Administration > MARC bibliographic frameworks > BKS > MARC structure). 3. Edit any record that uses the BKS framework and add a value for the 880$a sunfield. 4. Reindex: koha-elasticsearch --rebuild -d -b -a kohadev 5. As part of the output from reindexing this warning is generated: Use of uninitialized value $sub6 in pattern match (m//) at /kohadevbox/koha/Koha/SearchEngine/Elasticsearch.pm line 619. 6. Apply the patch. 7. Restart everything: restart_all 8. Reindex: koha-elasticsearch --rebuild -d -b -a kohadev 9. No warning in the output! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35792 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35792 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #169804|0 |1 is obsolete| | --- Comment #8 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 169988 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=169988&action=edit Bug 35792: Use of uninitialized value $sub6 Test plan: 1. Apply patch 2. Rerun and make sure the error "Use of uninitialized value $sub6 in pattern match (m//) at /usr/share/koha/lib/Koha/SearchEngine/Elastricsearch.pm" is no longer present. Signed-off-by: Chris Cormack <chris@bigballofwax.co.nz> Initial testing done, it works well, needs an additional sign off from an external party Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35792 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl QA Contact| |m.de.rooy@rijksmuseum.nl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35792 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |24.11.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=35792 --- Comment #9 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Pushed for 24.11! Well done everyone, thank you! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35792 --- Comment #10 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Welcome Yvonne, you are no officially a Koha developer :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35792 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |additional_work_needed --- Comment #11 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hm, I just realized we missed that the email address in the patch was not personalized. We need to check what we can do for the contributors file. If it's only this one we can map Yvonne, but it's a bit dangerous for future contributions using this email address. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35792 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|24.11.00 |24.11.00,24.05.04 released in| | Status|Pushed to main |Pushed to stable CC| |lucas@bywatersolutions.com --- Comment #12 from Lucas Gass <lucas@bywatersolutions.com> --- Backported to 24.05.x for upcoming 24.05.04 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35792 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m --- Comment #13 from Fridolin Somers <fridolin.somers@biblibre.com> --- additional_work_needed ? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35792 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|Academy, | |additional_work_needed | --- Comment #14 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- (In reply to Fridolin Somers from comment #13)
additional_work_needed ?
Will get back to that one eventually when working on the contributors list for 24.11. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35792 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to stable |Pushed to oldstable -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35792 Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to oldstable |RESOLVED Resolution|--- |FIXED CC| |wainuiwitikapark@catalyst.n | |et.nz --- Comment #15 from Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> --- Not backporting to 22.11 -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org