Bug 33929

Summary: Cannot export genre/form authority framework
Product: Koha Reporter: Alejo Janin <alejojanin>
Component: System AdministrationAssignee: Bugs List <koha-bugs>
Status: Failed QA --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: caroline.cyr-la-rose, esther.melander, gmcharlt
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Console error screenshot
Bug 33929: Resolved issue with "Export"/"Import" button click error
Bug 33929: Resolved issue with "Export"/"Import" button click error

Description Alejo Janin 2023-06-06 18:26:55 UTC
Created attachment 152064 [details]
Console error screenshot

Hi,

There is an error when clicking the "Export" button of the genre/form authority framework (it also happens with the "Import" button).

I'm attaching a screenshot with the web console message.

I'm using version 22.11.06


Thanks,
Alejo
Comment 1 Katrin Fischer 2023-06-08 22:22:14 UTC
Confirmed in master as well.
Comment 2 Peter Vashchuk 2023-07-12 14:05:36 UTC
Created attachment 153365 [details] [review]
Bug 33929: Resolved issue with "Export"/"Import" button click error

This patch addresses an error that occurred when clicking the "Export" button within the genre/form authority framework (the same issue was observed with the "Import" button). The error message displayed in the console was as follows:
"Uncaught Error: Syntax error, unrecognized expression: #exportModal_GENRE/FFORM4"

The error was caused by special symbols, particularly the  "/" in the code of the auth type. To fix this, the patch is using a plugin designed to handle character filtering for HTML IDs,  "$HtmlId", instead of "html" that kept "/" in "GENRE/FFORM4" which was causing this problem.
Comment 3 Sam Lau 2023-07-12 15:05:25 UTC
Created attachment 153369 [details] [review]
Bug 33929: Resolved issue with "Export"/"Import" button click error

This patch addresses an error that occurred when clicking the "Export" button within the genre/form authority framework (the same issue was observed with the "Import" button). The error message displayed in the console was as follows:
"Uncaught Error: Syntax error, unrecognized expression: #exportModal_GENRE/FFORM4"

The error was caused by special symbols, particularly the  "/" in the code of the auth type. To fix this, the patch is using a plugin designed to handle character filtering for HTML IDs,  "$HtmlId", instead of "html" that kept "/" in "GENRE/FFORM4" which was causing this problem.

Signed-off-by: Sam Lau <samalau@gmail.com>
Comment 4 Katrin Fischer 2023-07-12 21:24:30 UTC
There is no error now, but the file is incomplete. Only the header and some 2 more lines with #-# in the CSV export (7 lines total). 
Other frameworks export fine.

Please include a test plan in your commit message.
Comment 5 Caroline Cyr La Rose 2024-01-09 22:18:47 UTC
Still valid on master
Comment 6 Esther Melander 2024-05-09 18:04:57 UTC
Would it be simpler, and maybe faster, to rename the Genre Authority type without the special character? Is there a reason it needs to have it?