Bug 36628 - Error 500 when loading pending orders table for receiving on parcel.pl
Summary: Error 500 when loading pending orders table for receiving on parcel.pl
Status: RESOLVED INVALID
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low critical (vote)
Assignee: Bugs List
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 36192
  Show dependency treegraph
 
Reported: 2024-04-17 16:49 UTC by Emily Lamancusa
Modified: 2024-04-19 07:49 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Emily Lamancusa 2024-04-17 16:49:43 UTC
To reproduce:
1. Have at least one closed basket with an order line
   (When I reproduced it, I created an order from a new biblio record in KTD's sample basket, then closed the basket)
2. Go to Receive Shipments and add an invoice
3. Proceed to the next step of selecting order(s) to receive
-->A pop-up appear with the error, "Something went wrong when loading the table. 500: Internal Server Error", and the Pending Orders table fails to load and is empty.

I'm guessing something involving the REST API call needs to be updated for CSRF? I did confirm the table loads normally on the commit before the CSRF updates were pushed.
Comment 1 Marcel de Rooy 2024-04-18 10:01:25 UTC
Hi Emily,
I tried to reproduce on current master in my dev env but couldnt.
Could you check your logs and provide more details on this crash?
Comment 2 Emily Lamancusa 2024-04-18 15:46:02 UTC
I can't reproduce now either. Must have been something in my dev environment. Sorry about that!
Comment 3 Katrin Fischer 2024-04-18 21:05:37 UTC
Next time you see this: checked if your order line is linked to an item without item type - we have seen it a lot in that context.
Comment 4 Marcel de Rooy 2024-04-19 07:49:43 UTC
(In reply to Emily Lamancusa from comment #2)
> I can't reproduce now either. Must have been something in my dev
> environment. Sorry about that!

(In reply to Katrin Fischer from comment #3)
> Next time you see this: checked if your order line is linked to an item
> without item type - we have seen it a lot in that context.

We found the culprit on 36018. Not trivial: a ambiguous quantity column when the REST API adds a related table based on an embed.