On current main (and 24.05) you cannot delete a MARC bibliographic framework. Reported on chat (13 June 2024) for 24.05.00 and reproduced on main. Steps to reproduce: 1. Go to Koha administration > Catalog > MARC bibliographic frameworks. 2. For a framework, select Actions > Delete. 3. Message displayed: "Confirm deletion of framework '' ()?" (with options under this - "Yes, delete this framework" and "No, do not delete") (note that the URL has the framework code /cgi-bin/koha/admin/biblio_framework.pl?op=delete_confirm&frameworkcode=ACQ) 4. Click "Yes, delete this framework". 5. Error message displayed: "An error occurred when deleting this framework. Check the logs for details." 6. Nothing in the logs that seems of any help (/var/logs/koha/kohadev/* - where kohadev is the instance name). Other observations: 1. If you create a new framework (without adding any MARC structure) and attempt to delete, you get the same error. So not related records using the framework. 2. No JavaScript or other browser console errors using the browser's web development tools.
Created attachment 167680 [details] [review] Bug 37080: Cannot delete MARC bibliographic frameworks or authority types The scripts for managing both bib and authority frameworks are now expecting an op 'cud-delete_confirm' but delete_confirm isn't cud, it's just a GET of a page asking if you are sure. The scripts just need to expect the op they are actually getting, delete_confirm. Test plan: 1. Administration - MARC bibliographic framework - New framework 2. Give the framework any code and description and Submit 3. Actions menu for your new framework - Delete 4. Note the message says 'Confirm deletion of framework '' ()?" rather than having the code and description included. 5. Click Yes, note that deleting failed 6. Administration - Authority types - New authority type 7. Give the authority type any type and description and Submit 8. Actions menu for your authority type - Delete 9. Note the message again says '' () rather than 'desc' (FOO) 10. Click yes, note that deleting failed 11. Finally! Apply patch, reset_all 12. Repeat steps 1-10, this time noting that you get 'desc' (FOO) rather than '' (), and that deleting works.
Created attachment 167682 [details] [review] Bug 37080: Cannot delete MARC bibliographic frameworks or authority types The scripts for managing both bib and authority frameworks are now expecting an op 'cud-delete_confirm' but delete_confirm isn't cud, it's just a GET of a page asking if you are sure. The scripts just need to expect the op they are actually getting, delete_confirm. Test plan: 1. Administration - MARC bibliographic framework - New framework 2. Give the framework any code and description and Submit 3. Actions menu for your new framework - Delete 4. Note the message says 'Confirm deletion of framework '' ()?" rather than having the code and description included. 5. Click Yes, note that deleting failed 6. Administration - Authority types - New authority type 7. Give the authority type any type and description and Submit 8. Actions menu for your authority type - Delete 9. Note the message again says '' () rather than 'desc' (FOO) 10. Click yes, note that deleting failed 11. Finally! Apply patch, reset_all 12. Repeat steps 1-10, this time noting that you get 'desc' (FOO) rather than '' (), and that deleting works. Signed-off-by: David Nind <david@davidnind.com>
Thanks Phil for creating a patch so quickly!
Can confirm that the patch fixes the issue for both MARC frameworks and authority types.
Created attachment 167711 [details] [review] Bug 37080: Cannot delete MARC bibliographic frameworks or authority types The scripts for managing both bib and authority frameworks are now expecting an op 'cud-delete_confirm' but delete_confirm isn't cud, it's just a GET of a page asking if you are sure. The scripts just need to expect the op they are actually getting, delete_confirm. Test plan: 1. Administration - MARC bibliographic framework - New framework 2. Give the framework any code and description and Submit 3. Actions menu for your new framework - Delete 4. Note the message says 'Confirm deletion of framework '' ()?" rather than having the code and description included. 5. Click Yes, note that deleting failed 6. Administration - Authority types - New authority type 7. Give the authority type any type and description and Submit 8. Actions menu for your authority type - Delete 9. Note the message again says '' () rather than 'desc' (FOO) 10. Click yes, note that deleting failed 11. Finally! Apply patch, reset_all 12. Repeat steps 1-10, this time noting that you get 'desc' (FOO) rather than '' (), and that deleting works. Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Thanks for the quick correction here.
Thanks, all! Looks like there are a few more pages where this correction needs to be made...filing additional bugs.
Pushed for 24.11! Well done everyone, thank you!
Backported to 24.05.x for upcoming 24.05.02
Full CSRF not in 23.11.x
No changes required to the manual. This fixes forms so that they work. No screenshots need updating, and the task for deleting a framework (bibliographic or authority type) is not explicitly covered.