I noticed going to http://localhost:8080/ in Chrome caused the following to appear in /var/log/koha/kohadev/plack-opac-error.log: [2023/01/16 04:58:40] [WARN] WARNING: query problem with ZOOM error 10014 "CCL parsing error" (addinfo: "Search word expected") from diag-set 'ZOOM' at /kohadevbox/koha/C4/Search.pm line 352. [2023/01/16 04:58:40] [WARN] Use of uninitialized value $hits in numeric eq (==) at /kohadevbox/koha/opac/opac-search.pl line 613. [2023/01/16 04:58:40] [WARN] Use of uninitialized value $times in subtraction (-) at /kohadevbox/koha/C4/Search.pm line 1712. Of course, fixing this will require touching opac-search.pl without breaking anything...
Note that this happens with Chrome but not Firefox. I think Firefox just parses the HTML whereas Chrome seems to actually follow the link provided by the markup...
Ok now I'm only able to reproduce the on page load problem when I go to http://localhost:8080 But the same thing doesn't happen for http://kohadev.myDNSname.org:8080 Maybe it's a caching thing. I don't know. Browsers are weird.
Created attachment 145330 [details] [review] Bug 32639: Send opac-search.osdx without doing an empty search This patch sends out opac-search.osdx without running the entirety of opac-search.pl without any search query. This prevents unnecessary computations and warnings from appearing in the logs. Test plan: 1. Apply patch 2. Go to http://kohadev.myDNSname.org:8080/cgi-bin/koha/opac-search.pl?format=opensearchdescription 3. Note that no errors appear in /var/log/koha/kohadev/plack-opac-error.log 4. Verify that opac-search.pl still works as expected when doing a search via the web UI
Created attachment 145352 [details] [review] Bug 32639: Send opac-search.osdx without doing an empty search This patch sends out opac-search.osdx without running the entirety of opac-search.pl without any search query. This prevents unnecessary computations and warnings from appearing in the logs. Test plan: 1. Apply patch 2. Go to http://kohadev.myDNSname.org:8080/cgi-bin/koha/opac-search.pl?format=opensearchdescription 3. Note that no errors appear in /var/log/koha/kohadev/plack-opac-error.log 4. Verify that opac-search.pl still works as expected when doing a search via the web UI Signed-off-by: David Nind <david@davidnind.com>
Created attachment 147208 [details] [review] Bug 32639: Send opac-search.osdx without doing an empty search This patch sends out opac-search.osdx without running the entirety of opac-search.pl without any search query. This prevents unnecessary computations and warnings from appearing in the logs. Test plan: 1. Apply patch 2. Go to http://kohadev.myDNSname.org:8080/cgi-bin/koha/opac-search.pl?format=opensearchdescription 3. Note that no errors appear in /var/log/koha/kohadev/plack-opac-error.log 4. Verify that opac-search.pl still works as expected when doing a search via the web UI Signed-off-by: David Nind <david@davidnind.com> JD Amended patch: remove ref to bug number, we use git! Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Pushed to master for 23.05. Nice work everyone, thanks!
Nice work everyone! Pushed to stable for 22.11.x
Backported to 22.05.x for upcoming 22.05.11
applied to 21.11 for 21.11.19
Not backported to 21.05.x