Bug 19975 - Tag cloud searching does not working
Summary: Tag cloud searching does not working
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: master
Hardware: All All
: P5 - low major (vote)
Assignee: Jonathan Druart
QA Contact: Marcel de Rooy
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-01-16 01:53 UTC by lulihua
Modified: 2018-06-04 20:15 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:


Attachments
Screenshot of the error (115.87 KB, image/png)
2018-01-16 01:53 UTC, lulihua
Details
Bug 19975: Fix search by tags at the OPAC (1.74 KB, patch)
2018-01-22 20:13 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 19975: Fix search by tags at the OPAC (1.85 KB, patch)
2018-01-23 15:49 UTC, Claire Gravely
Details | Diff | Splinter Review
Bug 19975: Fix search by tags at the OPAC (1.89 KB, patch)
2018-01-26 07:43 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description lulihua 2018-01-16 01:53:18 UTC
Created attachment 70532 [details]
Screenshot of the error

From OPAC click Tag cloud-->click any of the tags that listed will return the following error 

No results found!
You did not specify any search criteria.

Error:
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


but if click the "GO" button again, will display the results correctly!
Comment 1 Jonathan Druart 2018-01-22 20:13:28 UTC
Created attachment 70811 [details] [review]
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
Comment 2 Claire Gravely 2018-01-23 15:04:19 UTC
hiya, 
I am still seeing the Error even with the patch applied.
Comment 3 Claire Gravely 2018-01-23 15:49:09 UTC
Created attachment 70850 [details] [review]
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

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>

https://bugs.koha-community.org/show_bug.cgi?id=19775
Comment 4 Marcel de Rooy 2018-01-26 07:43:42 UTC
Created attachment 70934 [details] [review]
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

Signed-off-by: Claire Gravely <claire.gravely@bsz-bw.de>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 5 Jonathan Druart 2018-01-30 17:26:09 UTC
Pushed to master for 18.05, thanks to everybody involved!
Comment 6 Fridolin SOMERS 2018-02-08 09:56:53 UTC
Pushed to 17.05.x for v17.05.09
Comment 7 Nick Clemens 2018-02-12 20:58:21 UTC
Awesome work all!

This patch has been pushed to 17.11.x and will be in 17.11.03