[Bug 18822] New: Advanced editor - Rancor - searching broken
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18822 Bug ID: 18822 Summary: Advanced editor - Rancor - searching broken Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: normal Priority: P5 - low Component: Cataloging Assignee: koha-bugs@lists.koha-community.org Reporter: nick@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org CC: m.de.rooy@rijksmuseum.nl It seems we expect MARC::Record objects, but get MarcXML for local searches - since we can double process the easiest method seem to be attempting conversion and using the updated record if successful -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18822 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Patch complexity|--- |Trivial patch Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18822 --- Comment #1 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 64431 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64431&action=edit Bug 18822 - Advanced editor - Rancor - searching broken This patch attempt to convert records before processing as we sometimes get XML instead of record objects. To test: 1 - Perform an advanced search from the advanced editor, make sure to select 'Local catalog' and a remote source 2 - Error 'Internal search error [Object object]' 3 - Apply patch 4 - Repeat search, success! 5 - Select and deselect various servers, search should still work -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18822 --- Comment #2 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 64432 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=64432&action=edit Bug 18822 - Better error response Apply this patch first to see a change in the error feedback - instead of [Object object] you should get a text readable error -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18822 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|koha-bugs@lists.koha-commun |nick@bywatersolutions.com |ity.org | -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18822 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks| |18823 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18823 [Bug 18823] Advanced editor - Rancor - add ability to edit records in import batches -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18822 Lee Jamison <ldjamison@marywood.edu> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |ldjamison@marywood.edu --- Comment #3 from Lee Jamison <ldjamison@marywood.edu> --- I don't get the error indicated in the test plan on a fresh kohadevbox. I did the following steps and did not get an error: (in Kohadevbox) 1. reset_all 2. Login to Intranet 3. Set EnableAdvancedCatalogingEditor to "Enable" under SysPrefs -> Labs 4. Navigate to the Cataloging module 5. Click Advanced Editor 6. Under Search, clicking "Advanced >>" 7. Select LIBRARY OF CONGRESS and Local catalog as servers 8. Type "history" in the Title field and click Search 9. Search results are listed and no error appears -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18822 Alex Buckley <alexbuckley@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |In Discussion CC| |alexbuckley@catalyst.net.nz --- Comment #4 from Alex Buckley <alexbuckley@catalyst.net.nz> --- As with Lee I also do not get the error specified in step 2 of the test plan of comment 1. I have tested the patches and they work the same as the current default behaviour on an up to date branch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18822 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Advanced editor - Rancor - |Advanced editor - Rancor - |searching broken |searching broken under | |Elasticsearch Status|In Discussion |Needs Signoff --- Comment #5 from Nick Clemens <nick@bywatersolutions.com> --- Ah, looks like I didn't realize I had Elasticsearch set when encountering this issue, that seems to be the trigger -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18822 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |katrin.fischer@bsz-bw.de --- Comment #6 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Wanted to test, but can't get Elasticsearch working in kohadevbox :( -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18822 --- Comment #7 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Still trying to get Elasticsearch to work, when reindexing from koha-shell I get: [NoNodes] ** No nodes are available: [http://localhost:9200], called from sub Search::Elasticsearch::Role::Client::Direct::__ANON__ at /usr/share/perl5/Catmandu/Store/ElasticSearch.pm line 27.kohadev-koha@kohadevbox:/home/vagrant/kohaclone$ -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18822 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #64431|0 |1 is obsolete| | --- Comment #8 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 68803 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=68803&action=edit Bug 18822 - Advanced editor - Rancor - searching broken This patch attempt to convert records before processing as we sometimes get XML instead of record objects. To test: 1 - Perform an advanced search from the advanced editor, make sure to select 'Local catalog' and a remote source 2 - Error 'Internal search error [Object object]' 3 - Apply patch 4 - Repeat search, success! 5 - Select and deselect various servers, search should still work Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18822 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #64432|0 |1 is obsolete| | --- Comment #9 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 68804 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=68804&action=edit Bug 18822 - Better error response Apply this patch first to see a change in the error feedback - instead of [Object object] you should get a text readable error Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18822 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18822 --- Comment #10 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- + my $fixed_rec; + eval { $fixed_rec = MARC::Record::new_from_xml( $set->{hits}->[$j], 'UTF-8' ) }; + $set->{hits}->[$j] = $fixed_rec unless $@; No way to know what to expect ? Is it from internal or external ? Do we have properties of these external ones ? And can we check ref($set->{hits}->[$j]) to see if it is already MARC::Record ? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18822 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Failed QA --- Comment #11 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Comment10 did not receive an answer. Changing the status sometimes helps :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18822 --- Comment #12 from Nick Clemens <nick@bywatersolutions.com> --- (In reply to Marcel de Rooy from comment #10)
+ my $fixed_rec; + eval { $fixed_rec = MARC::Record::new_from_xml( $set->{hits}->[$j], 'UTF-8' ) }; + $set->{hits}->[$j] = $fixed_rec unless $@;
No way to know what to expect ? Is it from internal or external ? Do we have properties of these external ones ? And can we check ref($set->{hits}->[$j]) to see if it is already MARC::Record ?
We have a slightly larger issue here of sometimes returning MARC::Records and sometimes returning marcxml. I suppose we could test the type, or assume in this case always marcxml, this was the simplest band-aid, we will need to address the larger problem on another report. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18822 --- Comment #13 from Nick Clemens <nick@bywatersolutions.com> --- (In reply to Marcel de Rooy from comment #10)
+ my $fixed_rec; + eval { $fixed_rec = MARC::Record::new_from_xml( $set->{hits}->[$j], 'UTF-8' ) }; + $set->{hits}->[$j] = $fixed_rec unless $@;
No way to know what to expect ? Is it from internal or external ? Do we have properties of these external ones ? And can we check ref($set->{hits}->[$j]) to see if it is already MARC::Record ?
Aha, so... We are searching the local database via z39.50 (not ES) We pass the results to new_record_from_zebra That sub assumes that if ES is enabled it will only be getting ES results (not true) I see two solutions: 1 - Add a param to new_record_from_zebra to tell it to convert records or not 2 - Move the test for ES outside the sub, always convert the records in the sub and just don't call it if using ES Opinion Marcel? or other suggestion -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18822 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Failed QA |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18822 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #68803|0 |1 is obsolete| | --- Comment #14 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 75561 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=75561&action=edit Bug 18822: Check if we have MARC::Record and convert if not when using ES The new_record_from_zebra subroutine assumes that when using ES we always get MARC::Record objects when using ES, but sometimes we get them as xml via Z39 or internally. This adds a test to new_from_zebra to confirm we have a record object and to convert it if not To test: 1 - Perform an advanced search from the advanced editor, make sure to select 'Local catalog' and a remote source 2 - Error 'Internal search error [Object object]' 3 - Apply patch 4 - Repeat search, success! 5 - Select and deselect various servers, search should still work -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18822 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |josef.moravec@gmail.com --- Comment #15 from Nick Clemens <nick@bywatersolutions.com> --- *** Bug 17739 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18822 --- Comment #16 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- This will only explode when there is a record found locally. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18822 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #68804|0 |1 is obsolete| | --- Comment #17 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 76764 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=76764&action=edit Bug 18822 - Better error response Apply this patch first to see a change in the error feedback - instead of [Object object] you should get a text readable error Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18822 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #75561|0 |1 is obsolete| | --- Comment #18 from Katrin Fischer <katrin.fischer@bsz-bw.de> --- Created attachment 76765 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=76765&action=edit Bug 18822: Check if we have MARC::Record and convert if not when using ES The new_record_from_zebra subroutine assumes that when using ES we always get MARC::Record objects when using ES, but sometimes we get them as xml via Z39 or internally. This adds a test to new_from_zebra to confirm we have a record object and to convert it if not To test: 1 - Perform an advanced search from the advanced editor, make sure to select 'Local catalog' and a remote source 2 - Error 'Internal search error [Object object]' 3 - Apply patch 4 - Repeat search, success! 5 - Select and deselect various servers, search should still work Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18822 Katrin Fischer <katrin.fischer@bsz-bw.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18822 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18822 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #76764|0 |1 is obsolete| | --- Comment #19 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 76937 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=76937&action=edit Bug 18822 - Better error response Apply this patch first to see a change in the error feedback - instead of [Object object] you should get a text readable error Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18822 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #76765|0 |1 is obsolete| | --- Comment #20 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Created attachment 76938 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=76938&action=edit Bug 18822: Check if we have MARC::Record and convert if not when using ES The new_record_from_zebra subroutine assumes that when using ES we always get MARC::Record objects when using ES, but sometimes we get them as xml via Z39 or internally. This adds a test to new_from_zebra to confirm we have a record object and to convert it if not To test: 1 - Perform an advanced search from the advanced editor, make sure to select 'Local catalog' and a remote source 2 - Error 'Internal search error [Object object]' 3 - Apply patch 4 - Repeat search, success! 5 - Select and deselect various servers, search should still work Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18822 --- Comment #21 from Marcel de Rooy <m.de.rooy@rijksmuseum.nl> --- Second patch: no eval around new_from_xml as in the Zebra counterpart. No blocker. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18822 Marcel de Rooy <m.de.rooy@rijksmuseum.nl> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |m.de.rooy@rijksmuseum.nl |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18822 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #22 from Nick Clemens <nick@bywatersolutions.com> --- Awesome work all! Pushed to master for 18.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18822 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable CC| |martin.renvoize@ptfs-europe | |.com --- Comment #23 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Pushed to 18.05.x for 18.05.02 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18822 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Blocks|18823 | Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18823 [Bug 18823] Advanced editor - Rancor - add ability to edit records in import batches -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18822 Fridolin SOMERS <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m --- Comment #24 from Fridolin SOMERS <fridolin.somers@biblibre.com> --- Pushed to 17.11.x for 17.11.09 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18822 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|Pushed to Stable |RESOLVED -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=18822 --- Comment #25 from Fridolin Somers <fridolin.somers@biblibre.com> --- *** Bug 18193 has been marked as a duplicate of this bug. *** -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org