Bugzilla – Attachment 81813 Details for
Bug 21556
Deleting same record twice leads to fatal software error
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21556: Deleting same record twice leads to fatal software error
Bug-21556-Deleting-same-record-twice-leads-to-fata.patch (text/plain), 2.18 KB, created by
Jonathan Druart
on 2018-11-01 14:28:47 UTC
(
hide
)
Description:
Bug 21556: Deleting same record twice leads to fatal software error
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2018-11-01 14:28:47 UTC
Size:
2.18 KB
patch
obsolete
>From 8879a35e900bb2a7a09759a68db4f235683053c0 Mon Sep 17 00:00:00 2001 >From: David Cook <dcook@prosentient.com.au> >Date: Fri, 12 Oct 2018 01:53:22 +0000 >Subject: [PATCH] Bug 21556: Deleting same record twice leads to fatal software > error > >If you delete a record, confirm the deletion, and try to delete the >record and confirm it again befoe the first deletion completes, you'll >generate a fatal software error. > >This patch unbinds the click handlers for the "Delete record" button >after the deletion is confirmed and just before the Javascript >processes the redirect to the next page in the process. > >To test: >1) You will need a bibliographic record that is able to be deleted >2) Click "Edit", then "Delete record", then "OK" >3) While the browser is reloading, click "Edit", then "Delete record", > then "OK >4) Observe a fatal error such as "Internal server error" or 'Can't call >method "holds" on an undefined value at >/home/vagrant/kohaclone/C4/Biblio.pm line 406.' >5) Apply the patch >6) Run "restart_all" on kohadevbox (or otherwise restart Plack if > running Plack) >7) Navigate to another bibliographic record that is able to be deleted >8) Click "Edit", then "Delete record", then "OK" >9) While the browser is reloading, click "Edit", then "Delete record" >10) Observe that no fatal software error is generated >11) You are redirected to >http://localhost:8081/cgi-bin/koha/catalogue/search.pl (on kohadevbox) > >Signed-off-by: Pierre-Marc Thibault <pierre-marc.thibault@inLibro.com> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > koha-tmpl/intranet-tmpl/prog/js/catalog.js | 1 + > 1 file changed, 1 insertion(+) > >diff --git a/koha-tmpl/intranet-tmpl/prog/js/catalog.js b/koha-tmpl/intranet-tmpl/prog/js/catalog.js >index d99d4dc8ab..8aeafc27f5 100644 >--- a/koha-tmpl/intranet-tmpl/prog/js/catalog.js >+++ b/koha-tmpl/intranet-tmpl/prog/js/catalog.js >@@ -43,6 +43,7 @@ function confirm_deletion(link) { > is_confirmed = confirm( CONFIRM_RECORD_DELETION ); > } > if (is_confirmed) { >+ $("#deletebiblio").unbind('click'); > window.location="/cgi-bin/koha/cataloguing/addbiblio.pl?op=delete&biblionumber=" + biblionumber; > } else { > return false; >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 21556
:
80442
|
80559
|
80560
|
80670
|
80685
| 81813 |
81814