This was made more apparent by bug 17170 - when a special limit that needs parsing is passed along witha query containing CCL indexes then the limits are not parsed (with exception of 'available' which is handled) This is due to a clause the prevents the normal parsing in C4::Search::buildQuery To test: 1 - Perform advanced search in staff client 2 - Select 'More options' 3 - In first box with keyword as index type 'ti:a' 4 - Enter a year into Limits 5 - Search 6 - You see only 'ti:a' in description, and search fails with bug 17170 1 - Save a search filter visible in staff client 2 - Perform a search like 'ti:a' 3 - Attempt to filter using custom filter 4 - In plack intranet error log: [2022/04/13 14:14:51] [WARN] WARNING: query problem with ti=a and search_filter=94 ZOOM error 10014 "CCL parsing error" (addinfo: "Unknown qualifier") from diag-set 'ZOOM' at /kohadevbox/koha/C4/Search.pm line 352.
Created attachment 133306 [details] [review] Bug 30528: Unit tests
Created attachment 133307 [details] [review] Bug 30528: Process limits before handling CCL query This patch moves the code that handles limit processing before that for CCL queries to ensure that special limit cases (branch, multibranch, etc) are handled before adding the limits to the query string To test: 1 - Apply unit tests patch only 2 - prove -v t/db_dependent/Search.t 3 - It fails 4 - Apply this patch 5 - It passes! 6 - Test searching and confirm things work as epxected
*** Bug 30527 has been marked as a duplicate of this bug. ***
I'm seeing this on 21.11.04, when looking at a detail view in the intranet: ==> /var/log/koha/hig/plack-error.log <== CCL parsing error (10014) Unknown qualifier ZOOM for query: Host-item=(Psychology and law =) at /usr/share/koha/lib/C4/Search.pm line 242. Warning from simple_search_compat: 'CCL parsing error (10014) Unknown qualifier ZOOM' at /usr/share/koha/lib/Koha/Biblio.pm line 540. In the staff client, this message is displayed above the title of the record: "There was an error searching for analytic records, please see the logs for details." Not sure if this is related.
(In reply to Magnus Enger from comment #4) > I'm seeing this on 21.11.04, when looking at a detail view in the intranet: > > ==> /var/log/koha/hig/plack-error.log <== > CCL parsing error (10014) Unknown qualifier ZOOM for query: > Host-item=(Psychology and law =) at /usr/share/koha/lib/C4/Search.pm line > 242. > Warning from simple_search_compat: 'CCL parsing error (10014) Unknown > qualifier ZOOM' at /usr/share/koha/lib/Koha/Biblio.pm line 540. > > In the staff client, this message is displayed above the title of the record: > > "There was an error searching for analytic records, please see the logs for > details." > > Not sure if this is related. This is related, but a different bug, see the ones below: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29418 https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=27575
Created attachment 134867 [details] [review] Bug 30528: Unit tests Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Created attachment 134868 [details] [review] Bug 30528: Process limits before handling CCL query This patch moves the code that handles limit processing before that for CCL queries to ensure that special limit cases (branch, multibranch, etc) are handled before adding the limits to the query string To test: 1 - Apply unit tests patch only 2 - prove -v t/db_dependent/Search.t 3 - It fails 4 - Apply this patch 5 - It passes! 6 - Test searching and confirm things work as epxected Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
OK, took me a while to wrap my head around, but I agree with this change now.. and yes, we should chase the clean_query stuff in the other bugs. Signing off
Created attachment 135361 [details] [review] Bug 30528: Unit tests Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Created attachment 135362 [details] [review] Bug 30528: Process limits before handling CCL query This patch moves the code that handles limit processing before that for CCL queries to ensure that special limit cases (branch, multibranch, etc) are handled before adding the limits to the query string To test: 1 - Apply unit tests patch only 2 - prove -v t/db_dependent/Search.t 3 - It fails 4 - Apply this patch 5 - It passes! 6 - Test searching and confirm things work as epxected Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Joonas Kylmälä <joonas.kylmala@iki.fi>
Pushed to master for 22.11. Nice work everyone, thanks!
Pushed to 22.05.x for 22.05.01
Not backported to oldoldstable (21.05.x). Feel free to ask if it's needed.