[Bug 40559] New: Fix a noisy warn in C4/XSLT and catalogue/MARCdetail
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40559 Bug ID: 40559 Summary: Fix a noisy warn in C4/XSLT and catalogue/MARCdetail Change sponsored?: --- Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: minor Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: m.de.rooy@rijksmuseum.nl QA Contact: testopia@bugs.koha-community.org Actually a long standing fix already.. -- 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=40559 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |m.de.rooy@rijksmuseum.nl |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=40559 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Fix a noisy warn in C4/XSLT |Fix a noisy warn in |and catalogue/MARCdetail |catalogue/MARCdetail -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40559 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff 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=40559 --- Comment #1 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 184919 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=184919&action=edit Bug 40559: Fix noisy warning in MARCdetail Rebased for 25.06. Resolves: [2025/07/31 10:59:02] [WARN] Use of uninitialized value in string eq at /usr/share/koha/catalogue/MARCdetail.pl line 203. Test plan: Check if warn disappears with this patch. Trigger the warn by opening catalogue/MARCdetail on staff view. (Should be enough with a normal MARC record.) 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=40559 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off --- Comment #2 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Trivial. Self SO -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40559 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40559 --- Comment #3 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 186407 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=186407&action=edit Bug 40559: cleanup -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40559 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@gmail.com --- Comment #4 from Jonathan Druart <jonathan.druart@gmail.com> --- Would you accept this follow-up? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40559 --- Comment #5 from Jonathan Druart <jonathan.druart@gmail.com> --- Also wondering.... next if ( $tagslib->{ $fields[$x_i]->tag() }->{ $subf[$i][0] }->{tab} // q{} ) ne $tabloop; # Note: defaulting to '0' changes behavior! Why? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40559 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |BLOCKED --- Comment #6 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Will check -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40559 --- Comment #7 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Jonathan Druart from comment #4)
Would you accept this follow-up?
I feel that we should move it on its own report. The noisy warning patch is just about 1 line of code (-1,+3) and can be backported. The cleanup could go on its own and would be an enhancement, right? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40559 --- Comment #8 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Jonathan Druart from comment #5)
Also wondering....
next if ( $tagslib->{ $fields[$x_i]->tag() }->{ $subf[$i][0] }->{tab} // q{} ) ne $tabloop; # Note: defaulting to '0' changes behavior!
Why?
Since tabloop can be zero? Or do you mean something else? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40559 --- Comment #9 from Jonathan Druart <jonathan.druart@gmail.com> --- (In reply to Marcel de Rooy from comment #8)
(In reply to Jonathan Druart from comment #5)
Also wondering....
next if ( $tagslib->{ $fields[$x_i]->tag() }->{ $subf[$i][0] }->{tab} // q{} ) ne $tabloop; # Note: defaulting to '0' changes behavior!
Why?
Since tabloop can be zero? Or do you mean something else?
The if syntax: next if ( $var ) ne $tabloop; -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40559 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |41153 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41153 [Bug 41153] (Follow-up of 40559) Cleanup catalogue/MARCdetail.pl -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40559 --- Comment #10 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Marcel de Rooy from comment #7)
(In reply to Jonathan Druart from comment #4)
Would you accept this follow-up?
I feel that we should move it on its own report. The noisy warning patch is just about 1 line of code (-1,+3) and can be backported. The cleanup could go on its own and would be an enhancement, right?
Well. Lets get this moving again now. I proposed to move the second patch. And I did so now. See bug 41153. Will take a look there further. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40559 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #186407|0 |1 is obsolete| | --- Comment #11 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Comment on attachment 186407 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=186407 Bug 40559: cleanup Moved to new report -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40559 --- Comment #12 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Marcel de Rooy from comment #1)
Trigger the warn by opening catalogue/MARCdetail on staff view. (Should be enough with a normal MARC record.)
Unfortunately, things are not as easy as they may seem. This (obviously) depends on the value of marc_subfield_structure.kohafield. I checked a production db and my dev db. And they were not the same. So I could trigger this on production easier than in dev. But note that this column is null by default: `kohafield` varchar(40) DEFAULT NULL, -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40559 --- Comment #13 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- PROD | 020 | a | biblioitems.isbn | | 020 | q | NULL | DEV | 020 | a | biblioitems.isbn | | 020 | q | | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40559 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|BLOCKED |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40559 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #184919|0 |1 is obsolete| | --- Comment #14 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 188796 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=188796&action=edit Bug 40559: Fix noisy warning in MARCdetail Rebased for 25.06. Resolves: Use of uninitialized value in string eq at /usr/share/koha/catalogue/MARCdetail.pl line 203. Test plan: Make sure that there is a combination of framework/field/subfield having an entry in marc_subfield_structure where kohafield is NULL. To force this for default fw on 020$q: update marc_subfield_structure set kohafield=NULL where tagfield='020' and tagsubfield='q' and frameworkcode=''; Pick a biblio in this framework having that field/subfield. Or create a 020 with $q filled. Hit catalogue/MARCdetail now. Without this patch, it triggers the warn. With this patch, it does not. 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=40559 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #15 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- I amended the commit message/test plan to be more accurate. Given the trivial change, the age of this patch (coming from 2020), the time spent on it now again and Jonathan having seen it too, taking the liberty to pass QA on it now. And continuing with the follow-up. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40559 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |25.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=40559 --- Comment #16 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Nice work everyone! Pushed to main for 25.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40559 Paul Derscheid <paul.derscheid@lmscloud.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to main |Pushed to stable Version(s)|25.11.00 |25.11.00,25.05.06 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40559 --- Comment #17 from Paul Derscheid <paul.derscheid@lmscloud.de> --- Nice work everyone! Pushed to 25.05.x -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40559 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)|25.11.00,25.05.06 |25.11.00,25.05.06,24.11.11 released in| | CC| |fridolin.somers@biblibre.co | |m Status|Pushed to stable |Pushed to oldstable --- Comment #18 from Fridolin Somers <fridolin.somers@biblibre.com> --- Pushed to 24.11.x for 24.11.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=40559 Wainui Witika-Park <wainuiwitikapark@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to oldstable |Needs documenting CC| |wainuiwitikapark@catalyst.n | |et.nz --- Comment #19 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