Bug 23402 - Item search doesn't work with screen selected
Summary: Item search doesn't work with screen selected
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Staff interface (show other bugs)
Version: 19.05
Hardware: All All
: P5 - low normal (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-07-31 12:40 UTC by Anke Bruns
Modified: 2020-11-30 21:44 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Anke Bruns 2019-07-31 12:40:30 UTC
In our 18.11 Item search doesn't work with screen as selected output.
Barcodes file and CSV do work.

The following software error appears:

"Unsupported format html at /usr/share/koha/intranet/cgi-bin/catalogue/itemsearch.pl line 42."

Line 42 of the said file reads:

if (defined $format and $format eq 'json') {

Bug #19706 is said to be resolved prior to 18.11, still the error occurs (with line 42 instead of 41 mentioned).

I found related to 19706 that it works well when there are some CCODEs for the library; even with a CCODE set, it doesn't work in my case.
Comment 1 Katrin Fischer 2019-07-31 13:51:00 UTC
Sometimes data can cause issues with the JSON based GUIs like the item search. A problem we recently ran into was backslashes in a publisher's name:

We are hoping for this one to be pushed for 18.11 soon:
Bug 21716 - Item Search hangs when \ exists in MARC fields

But that usually jsut results in a "forever loading".

Which is the exact 18.11.x version? I just tested with 18.11.6 and couldn't make it explode.
Comment 2 Anke Bruns 2019-08-02 09:56:11 UTC
We had 18.11.03-1; just this morning we upgraded to 19.05, and the bug is still there.
Comment 3 Katrin Fischer 2019-08-02 10:09:32 UTC
Updating severity for now - getting some more attention to see if someone else can confirm the bug.
Comment 4 David Nind 2019-08-02 11:00:34 UTC
I ran a quick test on 19.05.02 and didn't get any error messages - I didn't specify a specific item, just got all the results.

To test from /cgi-bin/catalogue/itemsearch.pl I didn't change any of the options pressed search button. A list of results appeared as expected.
Comment 5 David Nind 2019-08-02 11:07:15 UTC
Tested on master as well, and no error messages.
Comment 6 Anke Bruns 2019-08-02 12:21:01 UTC
Update: It seems to be a bug in the German interface; in the English it works well.
Comment 7 Anke Bruns 2019-08-02 12:23:13 UTC
Just updated the version for this bug from 18.11 to 19.05 - hope this was OK.
Comment 8 Anke Bruns 2019-08-05 09:20:30 UTC
Tried some demo installations from https://koha-community.org/demo/:

- Español, Italian, French: Itemsearch works well

- Swiss as well as "German" German: Itemsearch fails but returns a different error message from ours: "Internal Server Error" (see: http://koha.adminkuhn.ch:8080/).

So the problem really seems to be only in the German interface.
Comment 9 Anke Bruns 2019-08-05 09:22:25 UTC
Set severity to Normal as it's limited to one language, hope that's OK?
Comment 10 Katrin Fischer 2019-08-06 21:16:17 UTC
(In reply to Anke from comment #9)
> Set severity to Normal as it's limited to one language, hope that's OK?

Both resetting the version and that change are perfectly ok. Version should always be set to the newest the problem is found in, as any fix will be backported from there to older versions.

It might be something got translated that should not have been - I will try to have a look - it's probably hiding in the source code somewhere.
Comment 11 Katrin Fischer 2019-08-06 21:17:34 UTC
Ah, be careful with the status "In Discussion" - we only use that when we can't agree on something and it can be a bit of a difficult one to get noticed again/get out of. Better to keep it in "NEW" until someone starts working on it.
Comment 12 Anke Bruns 2019-08-07 07:12:05 UTC
(In reply to Katrin Fischer from comment #11)
> Ah, be careful with the status "In Discussion" - we only use that when we
> can't agree on something and it can be a bit of a difficult one to get
> noticed again/get out of. Better to keep it in "NEW" until someone starts
> working on it.

OK, thanks for instructing me on this. I'll keep it in mind.
Comment 13 Katrin Fischer 2019-08-08 11:27:51 UTC
This took me a while to figure out. The problem is in the translation:

misc/translator/po/de-DE-staff-prog.po

#. For the first occurrence,
#. SCRIPT
#: intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt:223
#: intranet-tmpl/prog/en/modules/reports/itemslost.tt:89
#, c-format
msgid "Not for loan status"
msgstr "Status für \"Nicht ausleihbar\""

This results in broken Javascript because of the added double quotes "":

 + '      <th id="items_status">' + _("Status für "Nicht ausleihbar"") + '</th>'

I've fixed the files in Pootle, so the next released versions will not have this problem anymore. For an immediate fix: change the po file manually and remove the "" and reinstall de-DE.
Comment 14 Anke Bruns 2019-08-08 14:38:25 UTC
Thanks - we changed the file, and now it works!
Comment 15 Katrin Fischer 2019-08-08 14:53:48 UTC
Glad to hear :)