Description
Miguel Tuimil
2016-07-26 09:04:07 UTC
Confirmed on current master. Steps to reproduce: Go to Home > Authorities Search "test" (including double quotes Result: Internal server error, plack error log says: ZOOM error 20003 "can't set prefix query" (addinfo: "@or @attr 7=1 @attr 1=Heading 0 @attr 1=Heading-Main @attr 5=1 @attr 4=6 "\\"test\\""") from diag-set 'ZOOM' Same with search after "test (one qoute only Created attachment 63957 [details] [review] Bug 16976: Authorities searches with double quotes gives ZOOM error 20003 To recreate: Go to Home > Authorities Search "test" (including double quotes Result: Internal server error, plack error log says: ZOOM error 20003 "can't set prefix query" (addinfo: "@or @attr 7=1 @attr 1=Heading 0 @attr 1=Heading-Main @attr 5=1 @attr 4=6 "\\"test\\""") from diag-set 'ZOOM' To test: - Appply patch, restart memchached an dplack - Repeat search "test" - Verify that there is no internal server error - Add an authority containing quotes, e.g. Johann "Wolfie" Goethe - Search after Wolfie (without quotes) - Verify that authority ist found - Search after "Wolfie" - Verify that authority is found - Verify that other searches for authorities behave as before Technical note: Escaping did not work. The patch simply removes double quotes from search values. Not sure if that is the ultimate solution, but it works. Created attachment 63963 [details] [review] Bug 16976: Authorities searches with double quotes gives ZOOM error 20003 To recreate: Go to Home > Authorities Search "test" (including double quotes Result: Internal server error, plack error log says: ZOOM error 20003 "can't set prefix query" (addinfo: "@or @attr 7=1 @attr 1=Heading 0 @attr 1=Heading-Main @attr 5=1 @attr 4=6 "\\"test\\""") from diag-set 'ZOOM' To test: - Appply patch, restart memchached an dplack - Repeat search "test" - Verify that there is no internal server error - Add an authority containing quotes, e.g. Johann "Wolfie" Goethe - Search after Wolfie (without quotes) - Verify that authority ist found - Search after "Wolfie" - Verify that authority is found - Verify that other searches for authorities behave as before Technical note: Escaping did not work. The patch simply removes double quotes from search values. Not sure if that is the ultimate solution, but it works. Signed-off-by: Lee Jamison <ldjamison@marywood.edu> Created attachment 64382 [details] [review] Bug 16976 - Authorities searches with double quotes gives ZOOM error 20003 [Alternate] I dug into this a little bit, it seems the issue is that we were double processing the query because of an extra call to C4::AuthoritiesMarc::SearchAuthorities I think we can simply remove this call To test: 1 - Perform an authority search for a value that returns results 2 - Wrap it in quotes and search 3 - 'Internal server error' 4 - Apply patch 5 - Search with quotes succeeds https://bugs.koha-community.org/show_bug.cgi?id=16796 Created attachment 64384 [details] [review] Bug 16976 - Authorities searches with double quotes gives ZOOM error 20003 [Alternate] I dug into this a little bit, it seems the issue is that we were double processing the query because of an extra call to C4::AuthoritiesMarc::SearchAuthorities I think we can simply remove this call To test: 1 - Perform an authority search for a value that returns results 2 - Wrap it in quotes and search 3 - 'Internal server error' 4 - Apply patch 5 - Search with quotes succeeds https://bugs.koha-community.org/show_bug.cgi?id=16796 Signed-off-by: Lee Jamison <ldjamison@marywood.edu> When testing in kohadevbox a restart_all is required Created attachment 64655 [details] [review] Bug 16976 - Authorities searches with double quotes gives ZOOM error 20003 [Alternate] I dug into this a little bit, it seems the issue is that we were double processing the query because of an extra call to C4::AuthoritiesMarc::SearchAuthorities I think we can simply remove this call To test: 1 - Perform an authority search for a value that returns results 2 - Wrap it in quotes and search 3 - 'Internal server error' 4 - Apply patch 5 - Search with quotes succeeds https://bugs.koha-community.org/show_bug.cgi?id=16796 Signed-off-by: Lee Jamison <ldjamison@marywood.edu> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Please provide tests. Created attachment 64923 [details] [review] Bug 16976 - Unit tests Created attachment 64998 [details] [review] Bug 16976 - Unit tests Created attachment 64999 [details] [review] Bug 16976 - Unit tests Applying: Bug 16976 - Unit tests fatal: sha1 information is lacking or useless (t/Search/Zebra/QueryBuilder.t). Repository lacks necessary blobs to fall back on 3-way merge. Cannot fall back to three-way merge. (In reply to Nick Clemens from comment #10) > Created attachment 64999 [details] [review] [review] > Bug 16976 - Unit tests Nick, please comment on which bug this one depends (for the tests) Created attachment 65901 [details] [review] Bug 16976 - Unit tests (In reply to Tomás Cohen Arazi from comment #12) > Nick, please comment on which bug this one depends (for the tests) Ah, sorry about that - accidentally obsoleted an extra patch, this depended on itself :-) Created attachment 65902 [details] [review] Bug 16976 - Authorities searches with double quotes gives ZOOM error 20003 [Alternate] I dug into this a little bit, it seems the issue is that we were double processing the query because of an extra call to C4::AuthoritiesMarc::SearchAuthorities I think we can simply remove this call To test: 1 - Perform an authority search for a value that returns results 2 - Wrap it in quotes and search 3 - 'Internal server error' 4 - Apply patch 5 - Search with quotes succeeds https://bugs.koha-community.org/show_bug.cgi?id=16796 Signed-off-by: Lee Jamison <ldjamison@marywood.edu> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Created attachment 65903 [details] [review] Bug 16976 - Unit tests Created attachment 65904 [details] [review] Bug 16976 - Authorities searches with double quotes gives ZOOM error 20003 [Alternate] I dug into this a little bit, it seems the issue is that we were double processing the query because of an extra call to C4::AuthoritiesMarc::SearchAuthorities I think we can simply remove this call To test: 1 - Perform an authority search for a value that returns results 2 - Wrap it in quotes and search 3 - 'Internal server error' 4 - Apply patch 5 - Search with quotes succeeds https://bugs.koha-community.org/show_bug.cgi?id=16796 Signed-off-by: Lee Jamison <ldjamison@marywood.edu> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Created attachment 65905 [details] [review] Bug 16976 - Unit tests Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Created attachment 66017 [details] [review] [SIGNED OFF] Bug 16976 - Authorities searches with double quotes gives ZOOM error 20003 [Alternate] I dug into this a little bit, it seems the issue is that we were double processing the query because of an extra call to C4::AuthoritiesMarc::SearchAuthorities I think we can simply remove this call To test: 1 - Perform an authority search for a value that returns results 2 - Wrap it in quotes and search 3 - 'Internal server error' 4 - Apply patch 5 - Search with quotes succeeds https://bugs.koha-community.org/show_bug.cgi?id=16796 Signed-off-by: Lee Jamison <ldjamison@marywood.edu> Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Created attachment 66018 [details] [review] [SIGNED OFF] Bug 16976 - Unit tests Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Pushed to master for 17.11, thanks to everybody involved! Pushed to 17.05.x, will be in 17.05.04 These patches have been pushed to 16.11.x and will be in 16.11.12. Blocked by Enhancement (10407), skipping for 16.05.x FYI: I've confirmed that 16.05.x is not affected by this bug :0) Hi, In 17.05, i have same error message on koha/tools/manage-marc-import.pl Software error: ZOOM error 20003 "can't set prefix query" (addinfo: "@or @attr 7=1 @attr 4=109 @attr 1=Local-Number 0 @attr 1=Any @attr 4=1 @attr 5=100 @attr 6=3 "F298826" @attr 1=Any @attr 4=1 @attr 5=100 @attr 6=3 "(SQTD)191897"") from diag-set 'ZOOM' I understand that patch is just for search on authorities/authorities-home.pl ? Regards, Marjorie (In reply to Marjorie Barry-Vila from comment #25) Hi Marjorie, Can you open a new bug report (link it with this one) and describe the different steps to recreate the issue you faced? Regards, Jonathan (In reply to Jonathan Druart from comment #26) > (In reply to Marjorie Barry-Vila from comment #25) > > Hi Marjorie, > > Can you open a new bug report (link it with this one) and describe the > different steps to recreate the issue you faced? > > Regards, > Jonathan Hi Jonathan, I create Bug 20596. Regards, Marjorie |