https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=30142 Bug ID: 30142 Summary: ElasticSearch MARC mappings should not accept whitespaces Change sponsored?: --- Product: Koha Version: 21.05 Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Searching - Elasticsearch Assignee: koha-bugs@lists.koha-community.org Reporter: domm@plix.at We had a "funny" bug today, because I updated some ElasticSearch Biblio MARC mappings, and entered "245bn " instead of "245bn" (notice the trailing space?) The Form accepted the invalid value, but after any edit to a biblio we'd get a 500 Error, with this (not very helpful) error message in plack-error.log "Invalid MARC field expression: 245bn " After spotting this, it was easy to fix the typo, but I think that the form should either be stricter when validating input or at least remove whitespace from the MARC input (AFAIK whitesapce is not allowed here). There is a TODO marker in admin/searchengine/elasticsearch/mappings.pl#161 which is probably related :-) I will submit a patch in a minute that will at least remove all whitespaces. Actually checking the format should not be too hard with some regex, but I'm not sure if the format is specified anywhere, and in the DB I see quite different values ("440a", "111(abcd)", "008_/14", "leader_/0-4", ...) -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.