From f0692841c3c8792a182be25a5c00ebd64bd4391e Mon Sep 17 00:00:00 2001 From: Fridolin Somers Date: Thu, 23 Nov 2017 11:27:08 +0100 Subject: [PATCH] Bug 19684: Only replace first colon char in facets link When a MARC data used in some facet contains colon char ":", this facet is broken it leads to no result. This is because all colon are replaced by = which is a CCL syntax char. This patch corrects by replacing only first occurence of colon char, that is the index not the data. Test plan : 1) Create a record with subject "Ainur: Yavanna" (650$a for MARC21 or 600$a for UNIMARC) 2) Index this record in Zebra 3) Perform a search that shows this subject in facets 4) Click on this facet link 5) You get the record as result --- C4/Search.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/C4/Search.pm b/C4/Search.pm index 9278f26..327eae0 100644 --- a/C4/Search.pm +++ b/C4/Search.pm @@ -1760,7 +1760,7 @@ sub buildQuery { $query =~ s/(?<=(st-numeric)):/=/g; $query =~ s/(?<=(st-year)):/=/g; $query =~ s/(?<=(st-date-normalized)):/=/g; - $limit =~ s/:/=/g; + $limit =~ s/:/=/; for ( $query, $query_desc, $limit, $limit_desc ) { s/ +/ /g; # remove extra spaces s/^ //g; # remove any beginning spaces -- 2.7.4