https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35104
--- Comment #100 from Martin Renvoize (ashimema) <[email protected]> --- Created attachment 194165 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=194165&action=edit Bug 35104: Improve nonxml_stripped error context to cover all affected fields The previous implementation stored only the first XML parser error message (e.g. "PCDATA invalid Char value 31 at line X, column Y"), which had two problems: - The XML parser stops at the first bad character, so records with multiple affected fields only reported one - The message gave no indication of which MARC field/subfield to fix Add _nonxml_affected_fields(), which scans the raw MARC XML string for every datafield subfield and control field that contains at least one character illegal in XML 1.0 (the same set stripped by StripNonXmlChars), and returns a deduplicated list of field references (e.g. ["245$a", "520$b"]). The stored error message now reads "Non-XML characters stripped from: 245$a" so cataloguers can immediately see which fields need attention, while the logger warn includes the field context alongside the original XML error for technical debugging. 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/
