If an ILL request does not contain an author, when viewing the ILL requests table, the following errors are displayed by Datatables: DataTables warning: table id=ill-requests - Requested unknown parameter 'metadata_Author' for row 0, column 0. For more information about this error, please see http://datatables.net/tn/4 DataTables warning: table id=ill-requests - Requested unknown parameter 'metadata_Author' for row 358, column 0. For more information about this error, please see http://datatables.net/tn/4 We need better handling of requests without populated author in the JS
+1 Agreed. I have noticed that the table that generates in the OPAC view adds 'N/A' to the author field. Perhaps the JS for the staff client table could be amended to insert "N/A" when the author field is absent.
I'm not actually seeing this any more on master. There have been a lot of changes to both the ILL template and the associated JS since this bug was created, so it's highly likely it was fixed. I've looked through the commits to try and identify where it was fixed, but there are so many and some are so far reaching that I gave up. Suffice it to say, this is now fixed! I'll mark this bug "Resolved"
We are on 18.11.08 with the Free Form backend and are experiencing this error. Would it be possible to still get a patch backported to 18.11.x?
Nick Clemens tracked it down to bug 18589, which made it to 19.05 and won't be backported to 18.11.x. Our library is scheduled to be upgraded to 19.05 in about 2 months, so we will just wait. Thanks!
Created attachment 92608 [details] [review] Bug 21406: [18.11.x only] Prevent errors from undefined fields in requests To test: 1 - In 18.11 enable ILL and install the freeform backend 2 - Create a request for 'Journal article' 3 - Note there is no 'Author' field 4 - Try to view ILL requests 5 - You get a datatables error about missing metadata_author column 6 - Apply patch 7 - No more error
Clearly Nick's sleuthing skills are far superior to mine, either that or he just doesn't give up so easily. Anyway, glad he was able to track it down!
Tested patch. Works as expected. Results of test: 1. Applied patch. 2. Created journal article request, filling in values for fields provided (no author field) 3. Viewed list of ILL Requests. No error or warning message. 4. Author field for new journal article request says "N/A" Thank you!!
Created attachment 94824 [details] [review] Bug 21406: [18.11.x only] Prevent errors from undefined fields in requests To test: 1 - In 18.11 enable ILL and install the freeform backend 2 - Create a request for 'Journal article' 3 - Note there is no 'Author' field 4 - Try to view ILL requests 5 - You get a datatables error about missing metadata_author column 6 - Apply patch 7 - No more error Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Works as expected, passing QA
backported to 18.11.x for 18.11.11