PDF button not working on server, but works fine on local_host
PDF button not working on server, but works fine on local_host
lincstar182
Posts: 6Questions: 4Answers: 0
While developing in local_host, the PDF button works fine. It does not work from the server though. Checking the Console log I find the following error message when pressing the PDF button:
"jqueryDataTables?v=7Qlgp-5FFydnUod7d5HcrP5Kr0y3TdiziVTwWT6gtUE1:1 Uncaught ReferenceError: fromString is not defined"
Anyone know what might be going on???
Thanks, Lincoln
This discussion has been closed.
Answers
The most logical thing to check would be if the various button .js files are actually present on the production server. You should be able to confirm that by looking at the your browsers development network tab.
@lincstar182 - I don't quite understand what you mean by "not work from the server". You are using a server-side script to trigger client-side code?
Allan
@glenderson - there are no button.js files. Only what is contained within datatables.js itself. Additionally, the 'Copy', 'Excel', and 'Print' button options work on both localhost as well as when hitting the website from a client to a server. It is only the 'PDF' that is throwing an error.
@allan - this is all client-side scripting with datatables.js. I have verified both localhost and server are loaded with the same script files and versions.
Here is more info:
1. Chrome console reports a problem is that the datatables function "fromString" is not defined. Here is the function as found in my copy of datatables at line 10076:
n = y {highWaterMark: 16384, buffer: Array[0], length: 0, pipes: null, pipesCount: 0…}, t = n {length: 0, parent: undefined}
16605
var i = null ;
i = TypeError: Invalid non-string/buffer chunk at tt (http://bois-ap-006:8065/bundles/jqueryDataTables?v=lzC8m2VZzwxdjbdqpNDFdY1kuBoNPqK55Dz7vow8UuY1:1:306298) at p (http://bois-ap-006:8065/bundles/jqueryDataTables?v=lzC8m2VZzwxdjbdqpNDFdY1kuBoNPqK55Dz7vow8UuY1:1:305249) at r.u.push (http://bois-ap-006:8065/bundles/jqueryDataTables?v=lzC8m2VZzwxdjbdqpNDFdY1kuBoNPqK55Dz7vow8UuY1:1:308751) at r._write (http://bois-ap-006:8065/bundles/jqueryDataTables?v=lzC8m2VZzwxdjbdqpNDFdY1kuBoNPqK55Dz7vow8UuY1:1:196329) at new r (http://bois-ap-006:8065/bundles/jqueryDataTables?v=lzC8m2VZzwxdjbdqpNDFdY1kuBoNPqK55Dz7vow8UuY1:1:194949) at r.createPdfKitDocument (http://bois-ap-006:8065/bundles/jqueryDataTables?v=lzC8m2VZzwxdjbdqpNDFdY1kuBoNPqK55Dz7vow8UuY1:1:83620) at r._createDoc (http://bois-ap-006:8065/bundles/jqueryDataTables?v=lzC8m2VZzwxdjbdqpNDFdY1kuBoNPqK55Dz7vow8UuY1:1:77924) at r.getBuffer (http://bois-ap-006:8065/bundles/jqueryDataTables?v=lzC8m2VZzwxdjbdqpNDFdY1kuBoNPqK55Dz7vow8UuY1:1:79373) at u.ext.buttons.pdfHtml5.action (http://bois-ap-006:8065/bundles/jqueryDataTables?v=lzC8m2VZzwxdjbdqpNDFdY1kuBoNPqK55Dz7vow8UuY1:1:1184829) at HTMLAnchorElement.<anonymous> (http://bois-ap-006:8065/bundles/jqueryDataTables?v=lzC8m2VZzwxdjbdqpNDFdY1kuBoNPqK55Dz7vow8UuY1:1:1150624) {message: "Invalid non-string/buffer chunk"}
16606
return f.isBuffer(t) || f.isString(t) || f.isNullOrUndefined(t) || n.objectMode || (i = new TypeError("Invalid non-string/buffer chunk")),
t = n {length: 0, parent: undefined}, n = y {highWaterMark: 16384, buffer: Array[0], length: 0, pipes: null, pipesCount: 0…
(i = new TypeError("Invalid non-string/buffer chunk"))
of this line:
function tt(n, t) {
var i = null ;
return f.isBuffer(t) || f.isString(t) || f.isNullOrUndefined(t) || n.objectMode || (i = new TypeError("Invalid non-string/buffer chunk")),
Thanks, Lincoln
We'd need a link to the page in order to debug what is going on in that case.
Thanks,
Allan
still I have this problem(PDF is working local but not in server) I got this error "theme1JS?v=yodpZPb8va1HJALGA0J0-qUJI3iZVIwv4lyXtXZx3eM1:1 Uncaught TypeError: Invalid non-string/buffer chunk"
can any one please help on this
Thanks,
Yasar