[Koha-bugs] [Bug 24586] Double quote escape doesn't work properly in C4::AuthoritiesMarc::SearchAuthorities with QueryParser enabled

2020-02-24 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24586

--- Comment #11 from David Cook  ---
That certainly makes life easier hehe

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24586] Double quote escape doesn't work properly in C4::AuthoritiesMarc::SearchAuthorities with QueryParser enabled

2020-02-24 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24586

Katrin Fischer  changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #10 from Katrin Fischer  ---
We've voted to remove the QueryParser code
(https://wiki.koha-community.org/wiki/Development_IRC_meeting_4_March_2020), so
I am closing this WONTFIX.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24586] Double quote escape doesn't work properly in C4::AuthoritiesMarc::SearchAuthorities with QueryParser enabled

2020-02-24 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24586

Katrin Fischer  changed:

   What|Removed |Added

 Blocks||12742
 Depends on|12742   |


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12742
[Bug 12742] Omnibus: QueryParser
-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24586] Double quote escape doesn't work properly in C4::AuthoritiesMarc::SearchAuthorities with QueryParser enabled

2020-02-24 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24586

Katrin Fischer  changed:

   What|Removed |Added

 Blocks|12742   |
 Depends on||12742


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12742
[Bug 12742] Omnibus: QueryParser
-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24586] Double quote escape doesn't work properly in C4::AuthoritiesMarc::SearchAuthorities with QueryParser enabled

2020-02-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24586

--- Comment #9 from David Cook  ---
(In reply to Jonathan Druart from comment #7)
> Created attachment 98721 [details] [review]
> Bug 24586: Add tests
> 
> Not sure about this approach. Maybe we are hiding a problem coming from
> somewhere else. Maybe better to handle the error from the callers.

In fact, I forgot to mention it, but my patch will produce duplicate
authorities. 

In the short term, I was ok with making authority duplicates rather than
failing a bib import, but that would be a regression in Koha I think.

Better to fail rather than return nothing. I just haven't put the time into
creating a complete solution as I have competing priorities :/.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24586] Double quote escape doesn't work properly in C4::AuthoritiesMarc::SearchAuthorities with QueryParser enabled

2020-02-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24586

--- Comment #8 from David Cook  ---
(In reply to Jonathan Druart from comment #7)
> Created attachment 98721 [details] [review]
> Bug 24586: Add tests
> 
> Not sure about this approach. Maybe we are hiding a problem coming from
> somewhere else. Maybe better to handle the error from the callers.

Agreed. The patch I've attached is a hot fix just to workaround the issue
temporarily and I figured I'd share it, but I don't think that it's a complete
solution.

For a long time, I've been thinking that we should catch errors from Zebra and
Zebra libraries, and then display a user-friendly message to users from the
calling script. Even something like "Something went wrong. Please contact your
system administrator."

I think that could actually help surface a lot of existing problems.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24586] Double quote escape doesn't work properly in C4::AuthoritiesMarc::SearchAuthorities with QueryParser enabled

2020-02-11 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24586

--- Comment #7 from Jonathan Druart  
---
Created attachment 98721
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=98721=edit
Bug 24586: Add tests

Not sure about this approach. Maybe we are hiding a problem coming from
somewhere else. Maybe better to handle the error from the callers.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24586] Double quote escape doesn't work properly in C4::AuthoritiesMarc::SearchAuthorities with QueryParser enabled

2020-02-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24586

--- Comment #6 from David Cook  ---
For what it's worth, this patch would work for non-QueryParser as well. It's
just about validating the PQF query before trying to search Zebra.

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24586] Double quote escape doesn't work properly in C4::AuthoritiesMarc::SearchAuthorities with QueryParser enabled

2020-02-05 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24586

--- Comment #5 from David Cook  ---
(In reply to Katrin Fischer from comment #4)
> I've added the omnibus bug for QueryParser - there is a ton of issues with
> it basically. I think we might deprecate it soon.

I am very much in favour of deprecating and removing the QueryParser. In the
beginning, I was very supportive of the QueryParser, but I think there are just
too many challenges trying to support it and the regular Koha query parsing.

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24586] Double quote escape doesn't work properly in C4::AuthoritiesMarc::SearchAuthorities with QueryParser enabled

2020-02-04 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24586

--- Comment #4 from Katrin Fischer  ---
I've added the omnibus bug for QueryParser - there is a ton of issues with it
basically. I think we might deprecate it soon.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24586] Double quote escape doesn't work properly in C4::AuthoritiesMarc::SearchAuthorities with QueryParser enabled

2020-02-04 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24586

Katrin Fischer  changed:

   What|Removed |Added

 Blocks||12742
 CC||katrin.fisc...@bsz-bw.de


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12742
[Bug 12742] Omnibus: QueryParser
-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24586] Double quote escape doesn't work properly in C4::AuthoritiesMarc::SearchAuthorities with QueryParser enabled

2020-02-04 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24586

--- Comment #3 from David Cook  ---
I've included a patch that I'm temporarily using as a workaround, but silently
failing isn't perfect either. 

We should probably give the user a report after saving the record saying what
happened with the authority linking.

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24586] Double quote escape doesn't work properly in C4::AuthoritiesMarc::SearchAuthorities with QueryParser enabled

2020-02-04 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24586

--- Comment #2 from David Cook  ---
Created attachment 98423
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=98423=edit
Bug 24586: Gracefully fail authority lookup if PQF query invalid

If Koha's query building has produced an invalid PQF query, don't
throw a fatal error. Instead, trap the error, warn, and then skip
the authority lookup for that field.

Test Plan:

I don't really have a good test plan at the moment. Enable
AutoCreateAuthorities and BiblioAddsAuthorities maybe, and then
try to do a search for 830$a with a value of the following:

Bad "query" value

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/


[Koha-bugs] [Bug 24586] Double quote escape doesn't work properly in C4::AuthoritiesMarc::SearchAuthorities with QueryParser enabled

2020-02-04 Thread bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24586

--- Comment #1 from David Cook  ---
QueryParser takes this as input:

(authtype:UNIF_TITLE) match-heading:"McGraw-Hill \\"Demystified\\" series"
#AuthidAsc

And it outputs this:
 @or @attr 1=Local-Number @attr 7=1 0 @and @and @attr 1=authtype @attr 5=100
@attr 4=6 "UNIF_TITLE" @and @attr 1=Match-heading @attr 4=1 @attr 5=100 @attr
6=3 "Demystified"" @attr 1=Match-heading @attr 4=1 @attr 5=100 @attr 6=3
"series\\"" @attr 1=Match-heading @attr 4=1 @attr 5=100 @attr 6=3 "McGraw-Hill
\\"

Which causes ZOOM::Query::PQF to throw a fatal error:
ZOOM error 20003 "can't set prefix query" (addinfo: "@or @attr 1=Local-Number
@attr 7=1 0 @and @and @attr 1=authtype @attr 5=100 @attr 4=6 "UNIF_TITLE" @and
@attr 1=Match-heading @attr 4=1 @attr 5=100 @attr 6=3 "Demystified"" @attr
1=Match-heading @attr 4=1 @attr 5=100 @attr 6=3 "series\\"" @attr
1=Match-heading @attr 4=1 @attr 5=100 @attr 6=3 "McGraw-Hill \\"")

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
___
Koha-bugs mailing list
Koha-bugs@lists.koha-community.org
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/