[Koha-bugs] [Bug 1653] New: No Results in OPAC Adv Search returns malformed message to user

bugzilla-daemon at pippin.metavore.com bugzilla-daemon at pippin.metavore.com
Thu Dec 13 23:00:20 CET 2007


http://bugs.koha.org/cgi-bin/bugzilla/show_bug.cgi?id=1653

           Summary: No Results in OPAC Adv Search returns malformed message
                    to user
           Product: Koha
           Version: HEAD
          Platform: PC
               URL: http://71.0.121.24:8181/cgi-bin/koha/opac-
                    search.pl?idx=kw&q=alexander&idx=kw&idx=kw&sort_by=relev
                    ance&do=OK
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P3
         Component: Searching
        AssignedTo: jmf at liblime.com
        ReportedBy: cnighswonger at foundations.edu
         QAContact: koha-bugs at nongnu.org


No Result found !

No results match your search for “” in Foundations Bible College & Seminary
Catalog.

This appears to be cause by opac-search.pl not handling the condition of $hits
undef in this conditional:

---------------------------------------------
if ($hits) {
            $template->param(total => $hits);
            my $limit_cgi_not_availablity = $limit_cgi;
            $limit_cgi_not_availablity =~ s/&limit=available//g;
            $template->param(limit_cgi_not_availablity =>
$limit_cgi_not_availablity);
            $template->param(limit_cgi => $limit_cgi);
            $template->param(query_cgi => $query_cgi);
            $template->param(query_desc => $query_desc);
            $template->param(limit_desc => $limit_desc);
            if ($query_desc || $limit_desc) {
                $template->param(searchdesc => 1);

...

            $template->param(   PAGE_NUMBERS => \@page_numbers,
                                previous_page_offset => $previous_page_offset)
unless $pages < 2;
            $template->param(next_page_offset => $next_page_offset) unless
$pages eq $current_page_number;
         }
---------------------------------------------

A simple fix is to do this:

else {
 $template->param(query_desc => $query_desc);
}

Though $query_desc is a bit cryptic to the end user.




------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.





More information about the Koha-bugs mailing list