To replicate: 1. Click on a cell in the table. The cell changes to save "Saving..." and then appears to become stuck. Nothing ever happens. Refreshing the page returns to the table to its original state.
Well, one thing happens when you have the browser console open: POST /cgi-bin/koha/admin/item_circulation_alerts.pl returns a 403, since the ajax request doesn't include the csrf_token.
Created attachment 171699 [details] [review] Bug 37979: Toggling Item circulation alerts table cells needs to send csrf_token When you click on a cell in the Item circulation alerts table, the page sends a POST to /cgi-bin/koha/admin/item_circulation_alerts.pl without including a csrf_token, which gets back a 403 error because that's sketchy behavior. It needs to include the token. Test plan: 1. Administration - Item circulation alerts 2. Open the browser devtools to the console 3. Click on any green table cell 4. It should have turned red, but instead your console turned red with a 403 5. Apply patch, reload 6. Click on any green table cell, it will turn red Sponsored-by: Chetco Community Public Library
Created attachment 171701 [details] [review] Bug 37979: Toggling Item circulation alerts table cells needs to send csrf_token When you click on a cell in the Item circulation alerts table, the page sends a POST to /cgi-bin/koha/admin/item_circulation_alerts.pl without including a csrf_token, which gets back a 403 error because that's sketchy behavior. It needs to include the token. Test plan: 1. Administration - Item circulation alerts 2. Open the browser devtools to the console 3. Click on any green table cell 4. It should have turned red, but instead your console turned red with a 403 5. Apply patch, reload 6. Click on any green table cell, it will turn red Sponsored-by: Chetco Community Public Library https://bugs.koha-community.org/show_bug.cgi?id=37959 Signed-off-by: Jan Kissig <jkissig@th-wildau.de>
Created attachment 171821 [details] [review] Bug 37979: Toggling Item circulation alerts table cells needs to send csrf_token When you click on a cell in the Item circulation alerts table, the page sends a POST to /cgi-bin/koha/admin/item_circulation_alerts.pl without including a csrf_token, which gets back a 403 error because that's sketchy behavior. It needs to include the token. Test plan: 1. Administration - Item circulation alerts 2. Open the browser devtools to the console 3. Click on any green table cell 4. It should have turned red, but instead your console turned red with a 403 5. Apply patch, reload 6. Click on any green table cell, it will turn red Sponsored-by: Chetco Community Public Library Signed-off-by: Jan Kissig <jkissig@th-wildau.de> Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Katrin has pushed this, but the bug number in the commit doesn't correspond to the bug number here so it didn't get closed.. Closing on her behalf now
Thanks for all the hard work! Pushed to main for the next 24.11.00 release as RM Assistant
(In reply to Martin Renvoize (ashimema) from comment #6) > Thanks for all the hard work! > > Pushed to main for the next 24.11.00 release as RM Assistant Thanks for noticing, I will keep a note for checking in the release notes.
I can't find the correct commit in main to cherry-pick: kohadev-koha@kohadevbox:koha(rmain2405)$ git log --pretty=oneline main | grep '37959' 000668a6fb1a7d6e0b58785a5fc827e3155b27bb Bug 37959: Correct bug number mistake. Going to just git bz apply this one
Backported to 24.05.x for upcoming 24.05.05
It was https://git.koha-community.org/Koha-community/Koha/commit/66eabead5f9a2041c864da197deed38733ffefef I'll try to stop thinking I can type bug numbers in commits, and only copy-paste them.
There was a mistake in the bug number in the attached patch file (might want to fix before you push): https://git.koha-community.org/Koha-community/Koha/commits/branch/main/search?q=37979&all=
Not for 23.11.x