Bug 36877 - Patron card creator does not work when editing layout, profile or template
Summary: Patron card creator does not work when editing layout, profile or template
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Tools (show other bugs)
Version: Main
Hardware: All All
: P5 - low major (vote)
Assignee: Jan Kissig
QA Contact: Marcel de Rooy
URL:
Keywords: RM_priority
Depends on: 34478
Blocks: 36192
  Show dependency treegraph
 
Reported: 2024-05-16 07:08 UTC by Jan Kissig
Modified: 2024-05-22 13:38 UTC (History)
2 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.05.00


Attachments
Bug 36877: Fix Patron card creator errors on editing layout, profile or template (4.77 KB, patch)
2024-05-16 09:39 UTC, Jan Kissig
Details | Diff | Splinter Review
Bug 36877: (follow-up) Fix op eq edit to op eq edit_form in edit-batch.pl (2.02 KB, patch)
2024-05-16 12:41 UTC, Jan Kissig
Details | Diff | Splinter Review
Bug 36877: Fix Patron card creator errors on editing layout, profile or template (4.83 KB, patch)
2024-05-16 12:48 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 36877: (follow-up) Fix op eq edit to op eq edit_form in edit-batch.pl (2.06 KB, patch)
2024-05-16 12:48 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 36877: Fix Patron card creator errors on editing layout, profile or template (4.93 KB, patch)
2024-05-17 09:22 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 36877: (follow-up) Fix op eq edit to op eq edit_form in edit-batch.pl (2.16 KB, patch)
2024-05-17 09:22 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Kissig 2024-05-16 07:08:53 UTC
1. When trying to edit a layout in patron card creator the following error is thrown on the website:

WARNING: An unsupported operation was attempted on layout 20. Please have your system administrator check the error log for details.

The log says:

[WARN] Unsupported operation type submitted: edit at /kohadevbox/koha/patroncards/edit-layout.pl line 271.

To reproduce:

a) go to http://localhost:8081/cgi-bin/koha/patroncards/manage.pl?card_element=layout
b) click on edit 'Test Layout'
c) the above warning shows up


2. When trying to edit a template it shows an empty 'New patron card template' form

3. When trying to edit a profile it shows an empty 'New printer profile' form


I think this is somehow related to Bug 34478 as all 3 scripts check for an operation $op eq 'cud-edit' but the query param is just 'edit'
Comment 1 Jan Kissig 2024-05-16 09:39:41 UTC Comment hidden (obsolete)
Comment 2 Jan Kissig 2024-05-16 12:41:55 UTC Comment hidden (obsolete)
Comment 3 Owen Leonard 2024-05-16 12:48:39 UTC
Created attachment 166823 [details] [review]
Bug 36877: Fix Patron card creator errors on editing layout, profile or template

This patch fixes the unexpected behaviour when clicking on edit layout,
edit profile or edit template in Patron card creator tool.

Test plans:

1.  edit layout:

  a) go to http://localhost:8081/cgi-bin/koha/patroncards/manage.pl?card_element=layout
  b) click on edit 'Test Layout'
  c) WARNING: An unsupported operation was attempted on layout 20.
     Please have your system administrator check the error log for
     details.

apply patch
  a) go to http://localhost:8081/cgi-bin/koha/patroncards/manage.pl?card_element=layout
  b) click on edit 'Test Layout'
  c) Edit patron card layout form 20 shows up

2. edit template and profile:

  a) go to http://localhost:8081/cgi-bin/koha/patroncards/manage.pl?card_element=template or
     http://localhost:8081/cgi-bin/koha/patroncards/manage.pl?card_element=profile
  b) click edit on an item in the table
  c) notice that the forms are empty

apply patch and redo steps a) and b) to load the edit form

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 4 Owen Leonard 2024-05-16 12:48:41 UTC
Created attachment 166824 [details] [review]
Bug 36877: (follow-up) Fix op eq edit to op eq edit_form in edit-batch.pl

    Additionally removes fixme comments

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 5 Marcel de Rooy 2024-05-17 09:22:03 UTC
Created attachment 166877 [details] [review]
Bug 36877: Fix Patron card creator errors on editing layout, profile or template

This patch fixes the unexpected behaviour when clicking on edit layout,
edit profile or edit template in Patron card creator tool.

Test plans:

1.  edit layout:

  a) go to http://localhost:8081/cgi-bin/koha/patroncards/manage.pl?card_element=layout
  b) click on edit 'Test Layout'
  c) WARNING: An unsupported operation was attempted on layout 20.
     Please have your system administrator check the error log for
     details.

apply patch
  a) go to http://localhost:8081/cgi-bin/koha/patroncards/manage.pl?card_element=layout
  b) click on edit 'Test Layout'
  c) Edit patron card layout form 20 shows up

2. edit template and profile:

  a) go to http://localhost:8081/cgi-bin/koha/patroncards/manage.pl?card_element=template or
     http://localhost:8081/cgi-bin/koha/patroncards/manage.pl?card_element=profile
  b) click edit on an item in the table
  c) notice that the forms are empty

apply patch and redo steps a) and b) to load the edit form

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 6 Marcel de Rooy 2024-05-17 09:22:05 UTC
Created attachment 166878 [details] [review]
Bug 36877: (follow-up) Fix op eq edit to op eq edit_form in edit-batch.pl

    Additionally removes fixme comments

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 7 Katrin Fischer 2024-05-17 09:56:59 UTC
If the patron card create has this issue, do we expect similar problems in the label creator?
Comment 8 Katrin Fischer 2024-05-17 10:05:12 UTC
Pushed for 24.05!

Well done everyone, thank you!
Comment 9 Fridolin Somers 2024-05-22 13:38:04 UTC
23.11.x not impacted ()