Bug 37235

Summary: Download single authority results in 500 error
Product: Koha Reporter: Caroline Cyr La Rose <caroline.cyr-la-rose>
Component: MARC Authority data supportAssignee: Owen Leonard <oleonard>
Status: Needs documenting --- QA Contact: Pedro Amorim <pedro.amorim>
Severity: major    
Priority: P5 - low CC: flyingendpaper, fridolin.somers, lucas, pedro.amorim, phil
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.11.00,24.05.06
Circulation function:
Bug Depends on: 36192    
Bug Blocks: 37252    
Attachments: Bug 37235: Fix export of single authority record
Bug 37235: Fix export of single authority record
Bug 37235: Fix export of single authority record

Description Caroline Cyr La Rose 2024-07-02 19:13:52 UTC
I'm getting a 500 error when I try to "save" (i.e. download) an authority record.

To recreate: 
1. Go to Authorities
2. Search for an authority 
3. Click on the authority header to access the detailed record page (authorities/detail.pl?authid=XXXX)
4. Click Save > MADS (XML)
   --> Error 500
5. Redo step 4 with the other formats (MARCXML, MARC (non-Unicode/MARC-8), MARC (Unicode/UTF8)
   --> Error 500


I get this on KTD with both Zebra and ES7.
Comment 2 Owen Leonard 2024-07-03 18:02:45 UTC
Created attachment 168468 [details] [review]
Bug 37235: Fix export of single authority record

When viewing an authority record, you have the option to "Save" in
several different formats. This operation is a GET operation and the
script should not be looking for a "cud-" operation.

To test you should have at least one authority record.

- Apply the patch and go to Authorities.
- Perform an authority search which will return one or more records.
- View the details of an authority record.
- From the toolbar, test the "Save" option*

* Note: In my test the export choice "MADS (XML)" resulted in a
  zero-byte file but I'm assuming that is a separate issue.

Sponsored-by: Athens County Public Libraries
Comment 3 Caroline Cyr La Rose 2024-07-03 18:19:47 UTC
Created attachment 168469 [details] [review]
Bug 37235: Fix export of single authority record

When viewing an authority record, you have the option to "Save" in
several different formats. This operation is a GET operation and the
script should not be looking for a "cud-" operation.

To test you should have at least one authority record.

- Apply the patch and go to Authorities.
- Perform an authority search which will return one or more records.
- View the details of an authority record.
- From the toolbar, test the "Save" option*

* Note: In my test the export choice "MADS (XML)" resulted in a
  zero-byte file but I'm assuming that is a separate issue.

Sponsored-by: Athens County Public Libraries
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Comment 4 Pedro Amorim 2024-07-05 14:10:53 UTC
Created attachment 168551 [details] [review]
Bug 37235: Fix export of single authority record

When viewing an authority record, you have the option to "Save" in
several different formats. This operation is a GET operation and the
script should not be looking for a "cud-" operation.

To test you should have at least one authority record.

- Apply the patch and go to Authorities.
- Perform an authority search which will return one or more records.
- View the details of an authority record.
- From the toolbar, test the "Save" option*

* Note: In my test the export choice "MADS (XML)" resulted in a
  zero-byte file but I'm assuming that is a separate issue.

Sponsored-by: Athens County Public Libraries
Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Comment 5 Katrin Fischer 2024-07-08 15:50:40 UTC
Pushed for 24.11!

Well done everyone, thank you!
Comment 6 Lucas Gass (lukeg) 2024-11-18 17:48:59 UTC
Backported to 24.05.x for upcoming 24.05.06
Comment 7 Fridolin Somers 2024-12-06 07:46:17 UTC
Not for 23.11.x