[Bug 16056] New: Error when deleting MARC authority
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16056 Bug ID: 16056 Summary: Error when deleting MARC authority Change sponsored?: --- Product: Koha Version: master Hardware: All URL: /cgi-bin/koha/authorities/authorities-home.pl OS: All Status: NEW Severity: major Priority: P5 - low Component: MARC Authority data support Assignee: gmcharlt@gmail.com Reporter: oleonard@myacpl.org QA Contact: testopia@bugs.koha-community.org When I try to delete a MARC authority record from the authority search results list (Authorities -> Search) I get an error. Can't call method "authtypecode" on an undefined value at C4/AuthoritiesMarc.pm line 305. I think the authority is being deleted correctly but the out-of-date index is triggering an error, because reloading the search results page triggers the error again. Reindexing makes it go away. I'm guessing this is related to Bug 15380 or Bug 15381. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16056 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16056 --- Comment #1 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 49394 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=49394&action=edit Bug 16056: Do not crash when searching for an authority if zebra's index is not up-to-date This patch fixes a regression introduced by commit 7e70202d34d75f988fbaea9b911347417c203aac Bug 15381: Remove GetAuthType and GetAuthTypeCode This first version will reintroduce the same behavior as before bug 15381: the record will be displayed even if it's no in the DB Test plan: Search for authorities delete one The zebra's index is not updated yet and the results will contain the record you have deleted. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16056 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|gmcharlt@gmail.com |jonathan.druart@bugs.koha-c | |ommunity.org CC| |jonathan.druart@bugs.koha-c | |ommunity.org -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16056 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |15381 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15381 [Bug 15381] Move the authority types related code to Koha::Authority::Type[s] - part 2 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16056 --- Comment #2 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Created attachment 49395 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=49395&action=edit Bug 16056: [ALT] Do not crash when searching for an authority if zebra's index is not up-to-date This patch fixes a regression introduced by commit 7e70202d34d75f988fbaea9b911347417c203aac Bug 15381: Remove GetAuthType and GetAuthTypeCode This second version will change the original behavior: If an authority record is still indexed by zebra but not in the DB, it won't be displayed. Test plan: Search for authorities delete one The results won't contain the record you have deleted. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16056 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16056 Owen Leonard <oleonard@myacpl.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #49395|0 |1 is obsolete| | --- Comment #3 from Owen Leonard <oleonard@myacpl.org> --- Created attachment 49437 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=49437&action=edit [SIGNED-OFF] Bug 16056: [ALT] Do not crash when searching for an authority if zebra's index is not up-to-date This patch fixes a regression introduced by commit 7e70202d34d75f988fbaea9b911347417c203aac Bug 15381: Remove GetAuthType and GetAuthTypeCode This second version will change the original behavior: If an authority record is still indexed by zebra but not in the DB, it won't be displayed. Test plan: Search for authorities delete one The results won't contain the record you have deleted. Signed-off-by: Owen Leonard <oleonard@myacpl.org> This patch fixes the error, and does so in a way which I think makes more sense than the other patch. I do no expect to see deleted record in my search results. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16056 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tomascohen@gmail.com --- Comment #4 from Tomás Cohen Arazi <tomascohen@gmail.com> --- I think the right behaviour would be that Koha raises an error when trying to delete a record it is not on the DB. Hey, what would happen if we filter non-existent indexed records out, and then someone deletes "another" record in the meantime? The best approach is to make Koha handle this situations elegantly, instead of adding more and more latency to search results rendering. I vote for: render the deleted record, using Zebra's data as usual. Then show an error box if the user tries to delete it. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16056 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |In Discussion -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16056 --- Comment #5 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Tomas, this patch fixes a a major regression, I don't think we should have this discussion here :) Let's go with the first patch if you think the second one is not good enough. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16056 --- Comment #6 from Owen Leonard <oleonard@myacpl.org> --- The first patch eliminates the error but from the point of view of the user it appears as if the deletion never happened. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16056 --- Comment #7 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- (In reply to Owen Leonard from comment #6)
The first patch eliminates the error but from the point of view of the user it appears as if the deletion never happened.
Yes, that was I have attached the second patch. But it was the behavior before 15381 (and I guess it has already been like that). -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16056 Jonathan Druart <jonathan.druart@bugs.koha-community.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|In Discussion |Signed Off --- Comment #8 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- Removing the in discussion status to get other opinions. Pick the patch you want, but pick one :) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16056 Tomás Cohen Arazi <tomascohen@gmail.com> 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=16056 Tomás Cohen Arazi <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #49394|0 |1 is obsolete| | Attachment #49437|0 |1 is obsolete| | --- Comment #9 from Tomás Cohen Arazi <tomascohen@gmail.com> --- Created attachment 49810 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=49810&action=edit Bug 16056: Do not crash when searching for an authority if zebra's index is not up-to-date This patch fixes a regression introduced by commit 7e70202d34d75f988fbaea9b911347417c203aac Bug 15381: Remove GetAuthType and GetAuthTypeCode This first version will reintroduce the same behavior as before bug 15381: the record will be displayed even if it's no in the DB Test plan: Search for authorities delete one The zebra's index is not updated yet and the results will contain the record you have deleted. Signed-off-by: Tomas Cohen Arazi <tomascohen@unc.edu.ar> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16056 Brendan Gallagher <brendan@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master CC| |brendan@bywatersolutions.co | |m --- Comment #10 from Brendan Gallagher <brendan@bywatersolutions.com> --- Pushed to Master - Should be in the May 2016 release. Thanks! -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=16056 Julian Maurice <julian.maurice@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |julian.maurice@biblibre.com Resolution|--- |FIXED Status|Pushed to Master |RESOLVED --- Comment #11 from Julian Maurice <julian.maurice@biblibre.com> --- Not needed in stable versions, status changed to RESOLVED -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org