Bug 41419

Summary: Error javascript "undefined" is not valid JSON when showing the order edit modal in orderreceive.tt
Product: Koha Reporter: Hammat wele <hammat.wele>
Component: AcquisitionsAssignee: Hammat wele <hammat.wele>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: caroline.cyr-la-rose, philippe.blouin
Version: Main   
Hardware: All   
OS: All   
GIT URL: Initiative type: ---
Sponsorship status: --- Comma delimited list of Sponsors:
Crowdfunding goal: 0 Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Attachments: Bug 41419 - Error javascript "undefined" is not valid JSON when showing the order edit modal in orderreceive.tt

Description Hammat wele 2025-12-09 22:09:20 UTC
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
Comment 1 Hammat wele 2025-12-09 22:14:01 UTC
Created attachment 190386 [details] [review]
Bug 41419 - Error javascript "undefined" is not valid JSON when showing the order edit modal in orderreceive.tt

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