[Bug 43168] New: Incorrect error output when staging a file
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43168 Bug ID: 43168 Summary: Incorrect error output when staging a file Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Architecture, internals, and plumbing Assignee: koha-bugs@lists.koha-community.org Reporter: nick@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org Target Milestone: --- To recreate: 1 - tail -f /var/log/koha/kohadev/intranet-error.log 2 - Stage a marc file 3 - Note the error: ==> /var/log/koha/kohadev/intranet-error.log <== [2026/07/23 19:11:37] [WARN] The following error(s) occurred during ISO2709 record import: ERROR: Koha::ImportBatch::try {...} /kohadevbox/koha/Koha/ImportBatch.pm (105) It seems we get errors as a return from C4::ImportBatch::RecordsFromISO2709File in the routine we define the array variable, and return a ref - which evaluates as 'true' perl -e 'my @errors; $errors = \@errors; warn $errors if $errors;' -- 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=43168 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |nick@bywatersolutions.com |ity.org | Status|NEW |Needs Signoff Patch complexity|--- |Trivial patch -- 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=43168 --- Comment #1 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- Created attachment 202554 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202554&action=edit Bug 43168: Check if there are errors, not if variable defined $errors is an array ref returned from a blank array variable if( $errors ){ #this will be true if( scalar @$errors ){ #only true when array has members To test: 1 - tail -f /var/log/koha/kohadev/intranet-error.log 2 - Stage a marc file 3 - Note the error: ==> /var/log/koha/kohadev/intranet-error.log <== [2026/07/23 19:11:37] [WARN] The following error(s) occurred during ISO2709 record import: ERROR: Koha::ImportBatch::try {...} /kohadevbox/koha/Koha/ImportBatch.pm (105) 4 - Apply patch 5 - Restart all 6 - Stage a file 7 - No error! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43168 Nick Clemens (kidclamp) <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off --- Comment #2 from Nick Clemens (kidclamp) <nick@bywatersolutions.com> --- Trivial, sending to QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43168 Lisette Scheer <lisette@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |jonathan.druart@gmail.com |y.org | CC| |lisette@bywatersolutions.co | |m -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43168 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- 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=43168 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #202554|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=43168 --- Comment #3 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 202782 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202782&action=edit Bug 43168: Check if there are errors, not if variable defined $errors is an array ref returned from a blank array variable if( $errors ){ #this will be true if( scalar @$errors ){ #only true when array has members To test: 1 - tail -f /var/log/koha/kohadev/intranet-error.log 2 - Stage a marc file 3 - Note the error: ==> /var/log/koha/kohadev/intranet-error.log <== [2026/07/23 19:11:37] [WARN] The following error(s) occurred during ISO2709 record import: ERROR: Koha::ImportBatch::try {...} /kohadevbox/koha/Koha/ImportBatch.pm (105) 4 - Apply patch 5 - Restart all 6 - Stage a file 7 - No error! Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43168 --- Comment #4 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 202783 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=202783&action=edit Bug 43168: Add a test Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=43168 Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |26.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=43168 --- Comment #5 from Pedro Amorim (ammopt) <pedro.amorim@openfifth.co.uk> --- Thanks everyone! Pushed to main for 26.11! -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org