To recreate: 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" I also see something like this in the console: PUT http://localhost:8081/api/v1/bookings/10 400 error
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!