Bug 31269 - DataTables error when managing staged MARC records
Summary: DataTables error when managing staged MARC records
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: MARC Bibliographic record staging/import (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Lucas Gass (lukeg)
QA Contact: Testopia
URL:
Keywords:
Depends on: 31138
Blocks:
  Show dependency treegraph
 
Reported: 2022-07-29 20:38 UTC by Lucas Gass (lukeg)
Modified: 2023-06-08 22:26 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
22.11.00, 22.05.06
Circulation function:


Attachments
Bug 31269: Define sDefaultContent for DataTables (1.69 KB, patch)
2022-07-29 23:44 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review
Bug 31269: Define sDefaultContent for DataTables (1.75 KB, patch)
2022-07-30 21:55 UTC, Katrin Fischer
Details | Diff | Splinter Review
Bug 31269: Define sDefaultContent for DataTables (1.82 KB, patch)
2022-08-01 08:51 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Lucas Gass (lukeg) 2022-07-29 20:38:04 UTC
Bug 31138 made some DataTable errors much more visible, which is good. One that was noticed was when managing staged MARC files.

To recreate:

1. Stage a MARC record for import
2. Once you have one click on 'Manage staged records'
3. You will see an alert that says "Something went wrong when loading the table."
4. If you dismiss that you should see the following error:

DataTables warning: table id=records-table - Requested unknown parameter '' for row 0, column 4. For more information about this error, please see http://datatables.net/tn/4
Comment 1 Lucas Gass (lukeg) 2022-07-29 23:40:31 UTC
Since columns 4 and 5 are later populated by jQuery 'sDefaultContent' should be used to define the placeholder value, I think.
Comment 2 Lucas Gass (lukeg) 2022-07-29 23:44:13 UTC
Created attachment 138380 [details] [review]
Bug 31269: Define sDefaultContent for DataTables

1. Stage a MARC record for import
2. Once you have one click on 'Manage staged records'
3. You will see an alert that says "Something went wrong when loading the table."
4. If you dismiss that you should see the following error:

DataTables warning: table id=records-table - Requested unknown parameter '' for row 0, column 4. For more information about this error, please see http://datatables.net/tn/4

5. Appy patch
6. Try ssteps 1 & 2 again
7. No DataTable errors
Comment 3 Katrin Fischer 2022-07-30 21:55:27 UTC
Created attachment 138400 [details] [review]
Bug 31269: Define sDefaultContent for DataTables

1. Stage a MARC record for import
2. Once you have one click on 'Manage staged records'
3. You will see an alert that says "Something went wrong when loading the table."
4. If you dismiss that you should see the following error:

DataTables warning: table id=records-table - Requested unknown parameter '' for row 0, column 4. For more information about this error, please see http://datatables.net/tn/4

5. Appy patch
6. Try ssteps 1 & 2 again
7. No DataTable errors

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 4 Katrin Fischer 2022-07-31 20:50:50 UTC
Please don't forget to fill in the assignee.
Comment 5 Jonathan Druart 2022-08-01 08:51:09 UTC
Created attachment 138451 [details] [review]
Bug 31269: Define sDefaultContent for DataTables

1. Stage a MARC record for import
2. Once you have one click on 'Manage staged records'
3. You will see an alert that says "Something went wrong when loading the table."
4. If you dismiss that you should see the following error:

DataTables warning: table id=records-table - Requested unknown parameter '' for row 0, column 4. For more information about this error, please see http://datatables.net/tn/4

5. Appy patch
6. Try ssteps 1 & 2 again
7. No DataTable errors

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 6 Tomás Cohen Arazi (tcohen) 2022-08-01 12:31:33 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!
Comment 7 Lucas Gass (lukeg) 2022-09-29 15:21:46 UTC
Backported to 22.05.x for 22.05.06
Comment 8 Arthur Suzuki 2022-10-12 11:08:53 UTC
I don't reproduce the original issue on 21.11.x branch.
Won't backport unless asked to.