Bugzilla – Attachment 70811 Details for
Bug 19975
Tag cloud searching does not working
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 19975: Fix search by tags at the OPAC
Bug-19975-Fix-search-by-tags-at-the-OPAC.patch (text/plain), 1.74 KB, created by
Jonathan Druart
on 2018-01-22 20:13:28 UTC
(
hide
)
Description:
Bug 19975: Fix search by tags at the OPAC
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2018-01-22 20:13:28 UTC
Size:
1.74 KB
patch
obsolete
>From 30aed483bcf0a815047b6144888e4b2f747ee27c Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 22 Jan 2018 17:04:28 -0300 >Subject: [PATCH] Bug 19975: Fix search by tags at the OPAC > >This bug has certainly be caused by > commit 091d6c513bcbee224ff06477e79be48cea7fe825 > Bug 17843: Replace C4::Koha::getitemtypeinfo with Koha::ItemTypes > >The reason is quite simple, in Koha::ItemType->translated_description >(called in opac-search.pl l.229) there is an eval to know if we have >access to the translated description of the item type, to avoid >retrieving it again. > >The evaluation of $@ later in opac-search.pl is supposed to test the 2 >eval made few lines before (a "normal" search, without tags), but >$@ contains the error message from the *last* eval command. >So we are raising an error that have been correctly handled in >Koha::ItemType. > >Test plan: >At the OPAC, click Tag cloud, then click any of the tags > >=> Without the patch you get >Koha::ItemType::get_column generated this error: DBIx::Class::Row::get_column(): No such column 'translated_description' on Koha::Schema::Result::Itemtype at /usr/share/koha/lib/Koha/Object.pm line 307 > >=> With the patch applied the page is correctly displayed >--- > 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 ccde617022..ebe870be47 100755 >--- a/opac/opac-search.pl >+++ b/opac/opac-search.pl >@@ -611,7 +611,7 @@ if ($tag) { > } > > # use Data::Dumper; print STDERR "-" x 25, "\n", Dumper($results_hashref); >-if ($@ || $error) { >+if (not $tag and ( $@ || $error)) { > $template->param(query_error => $error.$@); > output_html_with_http_headers $cgi, $cookie, $template->output; > exit; >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 19975
:
70532
|
70811
|
70850
|
70934