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: [email protected]
          Reporter: [email protected]

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.
_______________________________________________
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/

Reply via email to