Bugzilla – Attachment 190386 Details for
Bug 41419
Error javascript "undefined" is not valid JSON when showing the order edit modal in orderreceive.tt
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 41419 - Error javascript "undefined" is not valid JSON when showing the order edit modal in orderreceive.tt
Bug-41419---Error-javascript-undefined-is-not-vali.patch (text/plain), 2.43 KB, created by
Hammat wele
on 2025-12-09 22:14:01 UTC
(
hide
)
Description:
Bug 41419 - Error javascript "undefined" is not valid JSON when showing the order edit modal in orderreceive.tt
Filename:
MIME Type:
Creator:
Hammat wele
Created:
2025-12-09 22:14:01 UTC
Size:
2.43 KB
patch
obsolete
>From 6ee19c290bbecc67bb2ec93c509aaa4c34fca192 Mon Sep 17 00:00:00 2001 >From: Hammat Wele <hammat.wele@inlibro.com> >Date: Tue, 9 Dec 2025 22:11:05 +0000 >Subject: [PATCH] Bug 41419 - Error javascript "undefined" is not valid JSON > when showing the order edit modal in orderreceive.tt >MIME-Version: 1.0 >Content-Type: text/plain; charset=UTF-8 >Content-Transfer-Encoding: 8bit > >To reproduce > >1. Go to Acquisitions â New vendor, enter a name, check Vendor is Active, and click Save. >2. Click the name of the vendor you just created in the table. >3. Click New â Basket, enter a basket name, and click Save. >4. Click Add to basket â From a new (empty) record. >Enter a title, add an item, and click Save. >5. Click Close basket. >6. Click Receive shipments, enter a number in the Vendor invoice field, and click Next. >7. Click Receive for the created line. >8. Open the browser console. >9. In the modal, tick the Receive? checkbox and click Confirm. >10. Go to the previous page > â The console shows the error: "undefined" is not valid JSON at JSON.parse (<anonymous>) was shown >11. Apply the patch >12. Go to Acquisitions â Search for the vandor created on step 2 >13. Repeat step 3, 4, 5, 6, 7, 8, 9, 10 > â There is no js error >--- > .../intranet-tmpl/prog/en/modules/acqui/orderreceive.tt | 6 +++++- > 1 file changed, 5 insertions(+), 1 deletion(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt >index 8cb5d28e09f..5f651660dde 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/orderreceive.tt >@@ -548,6 +548,7 @@ > > $(document).ready(function(){ > // keep a copy for re-rendering >+ var firstDraw = true; > var $funds_tree = $('#bookfund').html(); > var base_query = { "order_id": {"-in": [[% multiple_orders | html %]]}}; > var pending_orders_url = "/api/v1/acquisitions/orders?only_active=1"; >@@ -642,7 +643,10 @@ > ], > [% IF only_one_order %] > "drawCallback": function( settings ) { >- $("#order_edit").modal("show"); >+ if (firstDraw) { >+ firstDraw = false; >+ $("#order_edit").modal("show"); >+ } > }, > [% END %] > }; >-- >2.34.1
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 41419
: 190386