From 6b0bc1b242736f017ab77a3c3e3863eaf0710235 Mon Sep 17 00:00:00 2001 From: Jacek Ablewicz Date: Sun, 23 Mar 2014 21:24:48 +0100 Subject: [PATCH] Bug 11986: fix searching by tags in OPAC when DOM mode is in use This patch fixes the following issue: in installations that are using zebra DOM indexing for bibliographic records, tag searching in OPAC doesn't work properly (clicking on any tag in OPAC leads to "404 error"). To test: ensure that with patch applied: 1) problems with tag searching get resolved for [some] test configuration with biblio DOM indexing enabled, 2) there are no apparent tag-searching-related regressions in OPAC, in some yet another test installation configured with legacy (grs1) indexing mode for biblios. Signed-off-by: Chris Cormack Signed-off-by: Kyle M Hall Signed-off-by: Galen Charlton --- opac/opac-search.pl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opac/opac-search.pl b/opac/opac-search.pl index 83f16d8a61..e2236c2e80 100755 --- a/opac/opac-search.pl +++ b/opac/opac-search.pl @@ -501,7 +501,7 @@ if ($tag) { my $taglist = get_tags({term=>$tag, approved=>1}); $results_hashref->{biblioserver}->{hits} = scalar (@$taglist); my @biblist = (map {GetBiblioData($_->{biblionumber})} @$taglist); - my @marclist = (map {$_->{marc}} @biblist ); + my @marclist = (map { (C4::Context->config('zebra_bib_index_mode') eq 'dom')? $_->{marcxml}: $_->{marc}; } @biblist); $DEBUG and printf STDERR "taglist (%s biblionumber)\nmarclist (%s records)\n", scalar(@$taglist), scalar(@marclist); $results_hashref->{biblioserver}->{RECORDS} = \@marclist; # FIXME: tag search and standard search should work together, not exclusively -- 2.11.0