https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21123
--- Comment #2 from Chris Nighswonger <[email protected]> --- Reproduced on current main in koha-testing-docker (PDF::Reuse 0.43), using the same code path patroncards/create-pdf.pl takes (Patroncard->new + draw_barcode): CODE39 draw_barcode: OK pdf bytes: 2861 CODE39MOD draw_barcode: DIES Undefined subroutine &C4::Patroncards::Patroncard::CheckDigits called at C4/Patroncards/Patroncard.pm line 434. CODE39MOD10 draw_barcode: DIES same, line 437 Root cause: C4::Patroncards::Patroncard calls CheckDigits() for the two checksum barcode types but never imports Algorithm::CheckDigits (C4::Labels::Label has the import; Patroncard.pm does not). The die aborts create-pdf.pl before the PDF is written, which matches comment 0 exactly: plain Code39 fine, both Modulo variants produce no PDF and the yellow "Error while creating PDF file" warning. The import was already missing in the 2016-2018 trees, so this is the same defect Katrin reported. With the missing import added, all three variants render (verified in the same environment; the checksum types produce a 3079-byte PDF vs 2861 for plain Code39, consistent with the added check digit). Patch attached. Test coverage for this code path is added by Bug 41719, whose patroncard draw_barcode() subtest fails on exactly these two types until this fix is applied. Bug 43095, which I filed for this defect before finding this older report, will be marked as a duplicate of this bug. (Reproduction and patch developed with AI assistance; full disclosure in the commit message.) -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list -- [email protected] To unsubscribe send an email to [email protected] website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
