Summary: | Error when attempting to edit a booking | ||
---|---|---|---|
Product: | Koha | Reporter: | Lucas Gass (lukeg) <lucas> |
Component: | Circulation | Assignee: | Lucas Gass (lukeg) <lucas> |
Status: | Pushed to main --- | QA Contact: | Martin Renvoize (ashimema) <martin.renvoize> |
Severity: | normal | ||
Priority: | P5 - low | CC: | gmcharlt, kyle.m.hall, martin.renvoize, pedro.amorim, tomascohen |
Version: | Main | Keywords: | rel_24_11_candidate |
Hardware: | All | ||
OS: | All | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | Trivial patch | Documentation contact: | |
Documentation submission: | Text to go in the release notes: | ||
Version(s) released in: |
25.05.00
|
Circulation function: | |
Attachments: |
Bug 39212: Explicitly set the contentType to JSON
Bug 39212: Explicitly set the contentType to JSON Bug 39212: Explicitly set the contentType to JSON Bug 39212: Explicitly set the contentType to JSON |
Description
Lucas Gass (lukeg)
2025-02-27 21:46:44 UTC
It looks like the ajax request when doing PUT isn't assuming JSON. Created attachment 178811 [details] [review] Bug 39212: Explicitly set the contentType to JSON To test: 1. Make an item or item type 'Bookable' 2. Place a booking for that item 3. Go the 'Bookings' tab for that item. 4. Edit the booking 5. Submit the edit request and see at the top of the modal "Failure" 6. APPLY PATCH 7. Try editing bookings, now it should work. Created attachment 178812 [details] [review] Bug 39212: Explicitly set the contentType to JSON To test: 1. Make an item or item type 'Bookable' 2. Place a booking for that item 3. Go the 'Bookings' tab for that item. 4. Edit the booking 5. Submit the edit request and see at the top of the modal "Failure" 6. APPLY PATCH 7. Try editing bookings, now it should work. I don't really know why I need this because in `api/v1/swagger/paths/bookings.yaml` is says: consumes: - application/json produces: - application/json Created attachment 178871 [details] [review] Bug 39212: Explicitly set the contentType to JSON To test: 1. Make an item or item type 'Bookable' 2. Place a booking for that item 3. Go the 'Bookings' tab for that item. 4. Edit the booking 5. Submit the edit request and see at the top of the modal "Failure" 6. APPLY PATCH 7. Try editing bookings, now it should work. Signed-off-by: Kristi Krueger <KKRUEGER@cuyahogalibrary.org> Created attachment 178930 [details] [review] Bug 39212: Explicitly set the contentType to JSON To test: 1. Make an item or item type 'Bookable' 2. Place a booking for that item 3. Go the 'Bookings' tab for that item. 4. Edit the booking 5. Submit the edit request and see at the top of the modal "Failure" 6. APPLY PATCH 7. Try editing bookings, now it should work. Signed-off-by: Kristi Krueger <KKRUEGER@cuyahogalibrary.org> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Thanks for fixing this Lucas.. it's odd, I would have expected to notice this a lot earlier.. it feels like either this is browser specific or a jQuery change.. either way, being explicit about contentType is a positive change. Passing QA Pushed for 25.05! Well done everyone, thank you! Backport please. |