https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28806
--- Comment #35 from Chris Nighswonger <[email protected]> --- Patch attached. Root cause: _get_label_item() joined branches with an implicit INNER join on i.homebranch = br.branchcode. An item whose homebranch is NULL (or points at a deleted branch) matches no row at all, so every field comes back empty and draw_label_text() silently skips all text lines -- nothing is logged. Where version-specific code then dies on the missing data, label-create-pdf.pl has already emitted the CGI attachment header, so the browser receives the zero-byte PDF reported here and in several related reports. The fix converts the branches join to a LEFT JOIN (using explicit JOIN syntax for the other tables) and logs a warning when no row is found, rather than proceeding on an empty hashref. Reproduced and verified in koha-testing-docker against the label-create-pdf.pl code path: before, a BIBBAR export for a NULL-homebranch item produced barcode-only output (1343 bytes); after, the full label renders (22570 bytes, text + barcode). Output for items with a valid homebranch is byte-identical before and after. Behavior is independent of PDF::Reuse version -- tested against both 0.39 and 0.43, which rules out the dependency bump in bug 41717 as a factor. Rebased onto current main and re-tested before attaching: prove t/db_dependent/Labels/ t/Creators.t -- 216 tests, all pass. koha-qa.pl PASS. Internal review: https://github.com/cnighswonger/koha-wip/pull/94 An AI tool assisted with the investigation and fix; full detail is in the commit message, and all work was reviewed by me. -- 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/
