[Bug 9866] New: Error when i click on advanced search [OPAC]
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9866 Bug ID: 9866 Summary: Error when i click on advanced search [OPAC] Classification: Unclassified Change sponsored?: --- Product: Koha Version: 3.10 Hardware: All OS: All Status: NEW Severity: major Priority: P5 - low Component: OPAC Assignee: oleonard@myacpl.org Reporter: hend.eleraky@bibalex.org When i try to click on advanced search [OPAC] i got the following error : Software error: Template process failed: file error - /usr/share/koha/opac/htdocs/opac-tmpl/prog/en/modules/search/advsearch.tt: not found at /usr/share/koha/lib/C4/Templates.pm line 132. For help, please send mail to the webmaster (webmaster@cdwin-hict8195), giving this error message and the time and date of the error. I can't find this file under "search" directory , i only have "results.tt" . I only have a file named "advsearch.tt" under intranet path
./usr/share/koha/intranet/htdocs/intranet-tmpl/prog/en/modules/catalogue/advsearch.tt
-- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9866 Hend <hend.eleraky@bibalex.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Priority|P5 - low |P1 - high -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9866 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #1 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Hi Hend, can you please always give the version you are testing with and if that appears with zebra or solr? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9866 --- Comment #2 from Hend <hend.eleraky@bibalex.org> --- Oh ! sorry , i forgot . Koha version : 3.10.03.000 Search Engine :Solr -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9866 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|3.10 |master Summary|Error when i click on |OPAC advanced search error |advanced search [OPAC] |with Solr enabled -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9866 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Component|OPAC |Searching Assignee|oleonard@myacpl.org |gmcharlt@gmail.com -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9866 --- Comment #3 from Hend <hend.eleraky@bibalex.org> --- I found that i need the following files so that i could use Advanced Searchbecause. I can't find them under /usr/share/koha/opac/htdocs/opac-tmpl/prog/en/modules/search/ & /usr/share/koha/opac/htdocs/opac-tmpl/prog/en/includes/ directories [1]advsearch.tt [2]intranet-bottom.inc [3]header.inc -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9866 --- Comment #4 from Hend <hend.eleraky@bibalex.org> --- I tried to make a way round to fix this problem .Here are the steps that i had done . 1- copy opac-search.tt to "search" directory and name it advsearch.tt. 2- Add advanced search part to search.pl [copy from opac-search.pl ] Added the following part after " my $itemtypes = GetItemTypes; " line #----------------Advanced Search---------------------- # the index parameter is different for item-level itemtypes my $itype_or_itemtype = (C4::Context->preference("item-level_itypes"))?'itype':'itemtype'; my @advancedsearchesloop; my $cnt; my $advanced_search_types = C4::Context->preference("AdvancedSearchTypes") || "itemtypes"; my @advanced_search_types = split(/\|/, $advanced_search_types); foreach my $advanced_srch_type (@advanced_search_types) { if ($advanced_srch_type eq 'itemtypes') { # itemtype is a special case, since it's not defined in authorized values my @itypesloop; foreach my $thisitemtype ( sort {$itemtypes->{$a}->{'description'} cmp $itemtypes->{$b}->{'description'} } keys %$itemtypes ) { my %row =( number=>$cnt++, ccl => "$itype_or_itemtype,phr", code => $thisitemtype, description => $itemtypes->{$thisitemtype}->{'description'}, imageurl=> getitemtypeimagelocation( 'opac', $itemtypes->{$thisitemtype}->{'imageurl'} ), ); push @itypesloop, \%row; } my %search_code = ( advanced_search_type => $advanced_srch_type, code_loop => \@itypesloop ); push @advancedsearchesloop, \%search_code; } else { # covers all the other cases: non-itemtype authorized values my $advsearchtypes = GetAuthorisedValues($advanced_srch_type, '', 'opac'); my @authvalueloop; for my $thisitemtype (@$advsearchtypes) { my %row =( number=>$cnt++, ccl => $advanced_srch_type, code => $thisitemtype->{authorised_value}, description => $thisitemtype->{'lib_opac'} || $thisitemtype->{'lib'}, imageurl => getitemtypeimagelocation( 'opac', $thisitemtype->{'imageurl'} ), ); push @authvalueloop, \%row; } my %search_code = ( advanced_search_type => $advanced_srch_type, code_loop => \@authvalueloop ); push @advancedsearchesloop, \%search_code; } } $template->param(advancedsearchesloop => \@advancedsearchesloop); # The following should only be loaded if we're bringing up the advanced search template if ( $template_type && $template_type eq 'advsearch' ) { # load the servers (used for searching -- to do federated searching, etc.) my $primary_servers_loop;# = displayPrimaryServers(); $template->param(outer_servers_loop => $primary_servers_loop,); my $secondary_servers_loop; $template->param(outer_sup_servers_loop => $secondary_servers_loop,); # set the default sorting if ( C4::Context->preference('OPACdefaultSortField') && C4::Context->preference('OPACdefaultSortOrder') ) { my $default_sort_by = C4::Context->preference('OPACdefaultSortField') . '_' . C4::Context->preference('OPACdefaultSortOrder'); $template->param( sort_by => $default_sort_by ); } # determine what to display next to the search boxes (ie, boolean option # shouldn't appear on the first one, scan indexes should, adding a new # box should only appear on the last, etc. my @search_boxes_array; my $search_boxes_count = 3; # begin whith 3 boxes for (my $i=1;$i<=$search_boxes_count;$i++) { # if it's the first one, don't display boolean option, but show scan indexes if ($i==1) { push @search_boxes_array, { scan_index => 1, }; } # if it's the last one, show the 'add field' box elsif ($i==$search_boxes_count) { push @search_boxes_array, { boolean => 1, add_field => 1, }; } else { push @search_boxes_array, { boolean => 1, }; } } $template->param(uc( C4::Context->preference("marcflavour")) => 1, # we already did this for UNIMARC advsearch => 1, search_boxes_loop => \@search_boxes_array); # use the global setting by default if ( C4::Context->preference("expandedSearchOption") == 1 ) { $template->param( expanded_options => C4::Context->preference("expandedSearchOption") ); } # but let the user override it if (defined $cgi->param('expanded_options')) { if ( ($cgi->param('expanded_options') == 0) || ($cgi->param('expanded_options') == 1 ) ) { $template->param( expanded_options => $cgi->param('expanded_options')); } } } #----------------------------------------------------- Now i could use advanced search. Please could you review it and check if there's any part that i am missing. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=9866 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution|--- |WONTFIX --- Comment #5 from Owen Leonard <oleonard@myacpl.org> --- Marking "Wontfix": See Bug 12538 - Solr removal -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org