https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35104
--- Comment #101 from Martin Renvoize (ashimema) <[email protected]> --- Created attachment 194166 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=194166&action=edit Bug 35104: Record each stripped character as its own error with field and position context Previously a single error row was written with a deduplicated list of affected field references. This was an improvement over the raw XML parser error (which only reported the first bad character), but still lost the per-character detail the parser provided. Replace _nonxml_affected_fields() with _find_nonxml_chars(), which scans every datafield subfield and control field in the original MARC XML and returns one hashref per bad-character occurrence, carrying: - field: human-readable field reference (e.g. "245$a") - char_ord: decimal ordinal of the illegal character - position: 1-based character offset within the field value store() now writes one biblio_metadata_errors row per occurrence with a message in the form: 245$a: invalid char value 31 (U+001F) at position 10 This combines field/subfield identification (introduced in the previous commit) with the character value and in-field location that the XML parser previously reported only for the first bad character. The logger warn retains the original XML parser error string alongside the deduplicated field list, so operators still see the full technical detail. A fallback to storing the raw parser error is kept for the unlikely case where the regex scan finds no matches despite stripping being needed. catalogue/detail.pl and catalogue/MARCdetail.pl now join all per-character messages with newlines so the existing <pre> alert block shows all errors. Sponsored-by: OpenFifth -- You are receiving this mail because: You are watching all bug changes. _______________________________________________ Koha-bugs mailing list [email protected] https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
