[Bug 12593] New: search facets die with regex error if biblio has square brackets in fields
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12593 Bug ID: 12593 Summary: search facets die with regex error if biblio has square brackets in fields Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: critical Priority: P5 - low Component: Searching Assignee: gmcharlt@gmail.com Reporter: dpavlin@rot13.org QA Contact: testopia@bugs.koha-community.org It's quite common to have [something] within facet data, and it produces following error: Unmatched [ in regex; marked by <-- HERE in m/^[ <-- HERE Život i običaji narodni ;$/ at /srv/koha//C4/Search.pm line 535. This problem was intoduced in Bug 12151 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12593 Dobrica Pavlinusic <dpavlin@rot13.org> changed: What |Removed |Added ---------------------------------------------------------------------------- See Also| |http://bugs.koha-community. | |org/bugzilla3/show_bug.cgi? | |id=12151 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12593 Dobrica Pavlinusic <dpavlin@rot13.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff Patch complexity|--- |Trivial patch -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12593 --- Comment #1 from Dobrica Pavlinusic <dpavlin@rot13.org> --- Created attachment 29789 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=29789&action=edit Bug 12593 - search facets die with regex error if biblio has square brackets in fields It's quite common to have [something] within facet data, and it produces following error: Unmatched [ in regex; marked by <-- HERE in m/^[ <-- HERE This problem was intoduced in Bug 12151 but is trivial to fix. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12593 Jonathan Druart <jonathan.druart@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |jonathan.druart@biblibre.co | |m Assignee|gmcharlt@gmail.com |dpavlin@rot13.org -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12593 M. de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |m.de.rooy@rijksmuseum.nl --- Comment #2 from M. de Rooy <m.de.rooy@rijksmuseum.nl> --- I tested with an author name including [something] as well as [something So, the second case included an unmatched [ in regex, but I did not get the error (on current master). I see the [ in the facets. Could you please add some more details to reproduce this? Does it depend on specific perl version? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12593 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12593 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #29789|0 |1 is obsolete| | --- Comment #3 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 29800 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=29800&action=edit Bug 12593 - search facets die with regex error if biblio has square brackets in fields It's quite common to have [something] within facet data, and it produces following error: Unmatched [ in regex; marked by <-- HERE in m/^[ <-- HERE This problem was intoduced in Bug 12151 but is trivial to fix. Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com> Good catch. To test: - Created a bibliographic record, linked to an authority record (personal name). Did a search that returned the author as a facet. - Added a [ symbol to the author name. - Repeated the search => FAIL: "Unmatched [ in regex; marked by <-- HERE in m/^[ <-- HERE" - Apply the patch - Retry the search => SUCCESS: No error, bracket shows correctly. Passes koha-qa.pl too. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12593 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com Depends on| |12151 -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12593 --- Comment #4 from Jonathan Druart <jonathan.druart@biblibre.com> --- (In reply to Tomás Cohen Arazi from comment #3)
To test: - Created a bibliographic record, linked to an authority record (personal name). Did a search that returned the author as a facet. - Added a [ symbol to the author name. - Repeated the search => FAIL: "Unmatched [ in regex; marked by <-- HERE in m/^[ <-- HERE"
I didn't reproduce neither. When I relaunch the search, the facet does not appear anymore in the facet list, that's all. I didn't get any error. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12593 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12593 Kyle M Hall <kyle@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #29800|0 |1 is obsolete| | --- Comment #5 from Kyle M Hall <kyle@bywatersolutions.com> --- Created attachment 29824 --> http://bugs.koha-community.org/bugzilla3/attachment.cgi?id=29824&action=edit [PASSED QA] Bug 12593 - search facets die with regex error if biblio has square brackets in fields It's quite common to have [something] within facet data, and it produces following error: Unmatched [ in regex; marked by <-- HERE in m/^[ <-- HERE This problem was intoduced in Bug 12151 but is trivial to fix. Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com> Good catch. To test: - Created a bibliographic record, linked to an authority record (personal name). Did a search that returned the author as a facet. - Added a [ symbol to the author name. - Repeated the search => FAIL: "Unmatched [ in regex; marked by <-- HERE in m/^[ <-- HERE" - Apply the patch - Retry the search => SUCCESS: No error, bracket shows correctly. Passes koha-qa.pl too. Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12593 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #6 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Patch pushed to master. Thanks Dobrica! -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12593 --- Comment #7 from Jonathan Druart <jonathan.druart@biblibre.com> --- It would be good to know how reproduce this issue. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12593 --- Comment #8 from Tomás Cohen Arazi <tomascohen@gmail.com> --- (In reply to Jonathan Druart from comment #7)
It would be good to know how reproduce this issue.
On comment #3 I explained the steps I used to reproduce it. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12593 --- Comment #9 from Jonathan Druart <jonathan.druart@biblibre.com> --- (In reply to Tomás Cohen Arazi from comment #8)
(In reply to Jonathan Druart from comment #7)
It would be good to know how reproduce this issue.
On comment #3 I explained the steps I used to reproduce it.
I have seen them, but that didn't help me. It seems working for both of you, so I suppose the patch works :) Looking at it, the changes looks consistent. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12593 --- Comment #10 from M. de Rooy <m.de.rooy@rijksmuseum.nl> --- (In reply to Jonathan Druart from comment #9)
(In reply to Tomás Cohen Arazi from comment #8)
(In reply to Jonathan Druart from comment #7)
It would be good to know how reproduce this issue.
On comment #3 I explained the steps I used to reproduce it.
I have seen them, but that didn't help me. It seems working for both of you, so I suppose the patch works :) Looking at it, the changes looks consistent.
I could not reproduce this problem too. Could it be a matter of some sysprefs, or perl version? -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12593 --- Comment #11 from Dobrica Pavlinusic <dpavlin@rot13.org> --- In our case, we have in 440$a "[ Život i običaji ;" which is probably a mistake, but does trigger this bug. I don't think we modified any system preferences related to facets. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12593 --- Comment #12 from Tomás Cohen Arazi <tomascohen@gmail.com> --- I have Ubuntu 14.04 (amd64). This implies Perl 5.18 and Apache 2.4. For testing the patch I did:
DROP DATABASE koha_devel; CREATE DATABASE koha_devel;
Run the webinstaller (mine is a DOM+MARC21 setup). Selected all the sample data. Added some sample records I have so facets are build. Made a search, Edited a Personal Name authority (appearing on the facets) adding '[' in the middle of the name. Reindexed, launched the search => BROKEN -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12593 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable CC| |gmcharlt@gmail.com --- Comment #13 from Galen Charlton <gmcharlt@gmail.com> --- Pushed to 3.16.x for inclusion in 3.16.4. -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12593 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |rel_3_16_4_candidate -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12593 Bug 12593 depends on bug 12151, which changed state. Bug 12151 Summary: remove remaining uses of the Perl smartmatch operator http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12151 What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Stable |RESOLVED Resolution|--- |FIXED -- You are receiving this mail because: You are watching all bug changes.
http://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=12593 Fridolin SOMERS <fridolyn.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Stable |RESOLVED CC| |fridolyn.somers@biblibre.co | |m Resolution|--- |FIXED --- Comment #14 from Fridolin SOMERS <fridolyn.somers@biblibre.com> --- Bug 12151 not in 3.14.x I set as resolved -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org