Bug 39800 - Error 500 when trying to delete patron card template
Summary: Error 500 when trying to delete patron card template
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: Label/patron card printing (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Hammat wele
QA Contact: Emily Lamancusa (emlam)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2025-05-01 15:29 UTC by Caroline Cyr La Rose
Modified: 2025-05-19 07:50 UTC (History)
4 users (show)

See Also:
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 39800: Error 500 when trying to delete patron card template (1.06 KB, patch)
2025-05-14 14:44 UTC, Hammat wele
Details | Diff | Splinter Review
Bug 39800: Error 500 when trying to delete patron card template (1.12 KB, patch)
2025-05-14 15:25 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 39800: Error 500 when trying to delete patron card template (1.18 KB, patch)
2025-05-16 20:34 UTC, Emily Lamancusa (emlam)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Caroline Cyr La Rose 2025-05-01 15:29:11 UTC
I noticed this on 24.05.05, but it also happens on main. When you try to delete the default patron card template, Koha returns a 500 error. I thought it was maybe because the patron card template was linked to a printer profile and this blocked the deletion, but I doesn't seem like it. If we edit the card template (without changing anything), then we can delete it.

To recreate:
1. Go to Tools > Patron card creator
2. Click Manage > Card templates
3. Click Delete next to the HB-PC0001 template
--> Error 500
4. Go back, and click Edit next to the HB-PC0001 template
5. Don't change anything, and click Save
6. Click Delete next to the HB-PC0001 template and confirm
--> Card template is deleted

Same goes for a printer profile (with fresh db)

To recreate:
0. reset_all
1. Go to Tools > Patron card creator
2. Click Manage > Printer profiles
3. Click Delete next to the '16' printer profile
--> Error 500
4. Go back, and click Edit next to the '16' profile
5. Don't change anything, and click Save
6. Click Delete next to the '16' printer profile
--> Printer profile is deleted
Comment 1 Hammat wele 2025-05-14 14:44:15 UTC
Created attachment 182453 [details] [review]
Bug 39800: Error 500 when trying to delete patron card template

Test plan:

1. Go to Tools > Patron card creator
2. Click Manage > Card templates
3. Click Delete next to the HB-PC0001 template
--> Error 500
4. Go back to Tools > Patron card creator
5. Click Manage > Printer profiles
6. Click Delete next to the '16' printer profile
--> Error 500
7. Apply the patch
8. Repeat step 1, 2, 3
--> Card template is deleted
9. Repeat step 4, 5, 6
--> Printer profilesis deleted
Comment 2 Owen Leonard 2025-05-14 15:25:54 UTC
Created attachment 182457 [details] [review]
Bug 39800: Error 500 when trying to delete patron card template

Test plan:

1. Go to Tools > Patron card creator
2. Click Manage > Card templates
3. Click Delete next to the HB-PC0001 template
--> Error 500
4. Go back to Tools > Patron card creator
5. Click Manage > Printer profiles
6. Click Delete next to the '16' printer profile
--> Error 500
7. Apply the patch
8. Repeat step 1, 2, 3
--> Card template is deleted
9. Repeat step 4, 5, 6
--> Printer profilesis deleted

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 3 Emily Lamancusa (emlam) 2025-05-16 20:34:46 UTC
Created attachment 182557 [details] [review]
Bug 39800: Error 500 when trying to delete patron card template

Test plan:

1. Go to Tools > Patron card creator
2. Click Manage > Card templates
3. Click Delete next to the HB-PC0001 template
--> Error 500
4. Go back to Tools > Patron card creator
5. Click Manage > Printer profiles
6. Click Delete next to the '16' printer profile
--> Error 500
7. Apply the patch
8. Repeat step 1, 2, 3
--> Card template is deleted
9. Repeat step 4, 5, 6
--> Printer profilesis deleted

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Comment 4 Katrin Fischer 2025-05-19 07:50:20 UTC
Pushed for 25.05!

Well done everyone, thank you!