Koha bug in item search
Dear colleagues, I have found a bug in the item search within the Russian localization. By default, the visualization of the item search selects all fields. When I attempt to perform a search, I receive a 500 error. The search works fine in both the German and English localizations. Any ideas on what might be causing this? Koha 24.11.01 Here is the query : https://katalog-intra.mws-osteuropa.org/cgi-bin/koha/catalogue/itemsearch.pl?homebranch_op=%3D&holdingbranch_op=%3D&location_op=%3D&itype_op=%3D&ccode_op=%3D¬forloan_op=%3D&itemlost_op=%3D&withdrawn_op=%3D&damaged_op=%3D&onloan=&f=barcode&op=like&q=&itemcallnumber_from=&itemcallnumber_to=&issues_op=%3E&issues=&datelastborrowed_op=%3E&datelastborrowed=&format=html Beste Grüße, Eugen Bastron
Dear colleagues, I found the following error in plack-error.log: Unsupported format html at /usr/share/koha/intranet/cgi-bin/catalogue/itemsearch.pl line 100. After reviewing my request, I noticed that the German version requests the format as json, whereas the Russian version requests html: &datelastborrowed=&format=json vs. &datelastborrowed=&format=html Any Ideas? Best regards, Eugen Bastron
Info LibraryITSolutions <info@libraryitsolutions.com> hat am 19.02.2025 10:03 CET geschrieben:
Dear colleagues,
I have found a bug in the item search within the Russian localization. By default, the visualization of the item search selects all fields. When I attempt to perform a search, I receive a 500 error.
The search works fine in both the German and English localizations.
Any ideas on what might be causing this?
Koha 24.11.01
Here is the query :
Beste Grüße, Eugen Bastron _______________________________________________
Koha mailing list http://koha-community.org Koha@lists.katipo.co.nz Unsubscribe: https://lists.katipo.co.nz/mailman/listinfo/koha
It looks like there is problem with the Russian translation which is causing a JavaScript error on the item search page. The translation file (ru-RU-staff-prog.po) has this: #: koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt:379 #: koha-tmpl/intranet-tmpl/prog/en/modules/reports/itemslost.tt:100 #, c-format msgid "Not for loan status" msgstr "Статус \"на дом не выдается\"" This creates double quotes in the JS section of the template which trigger the error. In other parts of the templates this kind of string might work with no problems, but because this generates JavaScript it is a problem. I'm not sure how we could improve this process for translators. A manual fix to the .po file (if you're able to rebuild the translated templates) would look like this: msgstr "Статус 'на дом не выдается'" A manual fix to the template would change this line: + ' <th id="items_status" data-colname="notforloan_status">' + _("Статус "на дом не выдается"") + '</th>' ...to this: + ' <th id="items_status" data-colname="notforloan_status">' + _("Статус 'на дом не выдается'") + '</th>' -- Owen -- Web Developer Athens County Public Libraries (740) 737-6006 https://www.myacpl.org
Hello Owen, changing of quotes in htdocs/intranet-tmpl/prog/ru-RU/modules/catalogue/itemsearch.tt solve this problem. Thank you very much! Best regards Eugen Bastron
Owen Leonard <oleonard@myacpl.org> hat am 25.02.2025 13:27 CET geschrieben:
It looks like there is problem with the Russian translation which is causing a JavaScript error on the item search page. The translation file (ru-RU-staff-prog.po) has this:
#: koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/itemsearch.tt:379 #: koha-tmpl/intranet-tmpl/prog/en/modules/reports/itemslost.tt:100 #, c-format msgid "Not for loan status" msgstr "Статус \"на дом не выдается\""
This creates double quotes in the JS section of the template which trigger the error. In other parts of the templates this kind of string might work with no problems, but because this generates JavaScript it is a problem. I'm not sure how we could improve this process for translators.
A manual fix to the .po file (if you're able to rebuild the translated templates) would look like this:
msgstr "Статус 'на дом не выдается'"
A manual fix to the template would change this line:
+ ' <th id="items_status" data-colname="notforloan_status">' + _("Статус "на дом не выдается"") + '</th>'
...to this:
+ ' <th id="items_status" data-colname="notforloan_status">' + _("Статус 'на дом не выдается'") + '</th>'
-- Owen
-- Web Developer Athens County Public Libraries (740) 737-6006 https://www.myacpl.org
participants (2)
-
Info LibraryITSolutions -
Owen Leonard