Datatables Editor not loading in production
Datatables Editor not loading in production
soban
Posts: 3Questions: 1Answers: 0
I am having strange issue with Datatables editor,
Issue is that It is working fine on localhost and When I deploy to Server (Heroku) then page keeps loading and freezes, and stop responding. I have tested on Chrome, edge, Firefox, Safari.
I am using Trial version of Datatables Editor V1.9.3,
If I remove Editor and just use datatables then it works fine on production too.
Kindly help me out of anyone already had this issue too.
Appreciated.
This discussion has been closed.
Answers
Are you seeing console errors on the page? Or network requests failing?
If you are able to link to your page, we can take a look,
Colin
There are no errors on console and It doesn't evaluate any js either, I think it is Editor JS which is being evaluating and due to some reason keeps running.
And There is no failing Network requests,
I can't have a public link as it is deep inside project with authentication.
If you look at your browser’s network inspector, are you able to see the DataTables Editor JS file being loaded? Does it actually get to the point of initialising the DataTable, or is there something else happening? Is Heroku attempting to parse the script at all, or perhaps adding something to it?
Without a link I’m afraid this is going to be really difficult for us to debug.
Allan
Hi @allen Yes, it loads JS,
I am using Ruby on Rails and it generate combine js which is this one: https://workof-enterprise-staging.herokuapp.com/assets/datatables-543cd3bd7f6b3ff5bfe55a7d7978655bb269806299562b7a02b55675d13eb4dd.js
This one contains JS for
jquery.dataTables-1.10.21.min
dataTables.fixedColumns-3.3.1.min
dataTables.editor
editor.bootstrap
Even If I just try to evaluate this js file, it still hangs console and tab.
I think maybe something happening when merging or minifying js?
Do you have some minification of the files happening on the fly, or during your build process? If so, it might be worth disabling that.
Editor's trial Javascript is obfuscated, so it is possible that running it through another minifier might cause problems.
Allan
I am facing same issue with editor version v1.9.4. Is there any fix to this issue? i am using it in JSP with tomcat server. There is no error on console. page keeps loading and freezes, and stop responding. if i remove editor files everything works fine. it only happen when i add editor files.
On my local server everything is working fine with editors files. it is only happening on production server. that is hosted on AWS EC2 instance.
@Qasim__ Yep, that certainly shouldn't be happening. As this isn't a known issue, are you able to link to your page so we can diagnose?
Colin
I too have this freezing issue when I load dataTables.editor.js (Version: 1.9.6) in production Rails asset pipeline. Works fine in development. Consistently able to reproduce by removing the file recompiling, restart server and suddenly the site starts working again. Add it, recompile, restart server and again entire site freezes. Basic page load does not occur.
Are you using the trial version and passing it through a minifier? I've seen minifiers cause corruption in the already obfuscated trial code which it sounds like what you are seeing. Are you able to disable your minifier to confirm if that is the issue?
Regards,
Allan