Uncaught TypeError: $.fn.dataTable.Editor is not a constructor
Uncaught TypeError: $.fn.dataTable.Editor is not a constructor
Sir, My webpages were working fine till noon after that I'm getting following error -
Uncaught TypeError: $.fn.dataTable.Editor is not a constructor
Going through the errors reflected in developer mode of browser, it transpired that something was wrong with editor files. However, the files related to editor are intact for may a days.
A snippet of developer mode is as under ;
dataTables.editor.min.js:12 Uncaught SyntaxError: Unexpected token '.'
jquery-3.3.1.js:3818 jQuery.Deferred exception: $.fn.dataTable.Editor is not a constructor TypeError: $.fn.dataTable.Editor is not a constructor
at HTMLDocument.<anonymous> (https://e-reporting.in/Data/RTC/index.php:3112:16)
at mightThrow (https://e-reporting.in/js/jquery-3.3.1.js:3534:29)
at process (https://e-reporting.in/js/jquery-3.3.1.js:3602:12) undefined
jQuery.Deferred.exceptionHook @ jquery-3.3.1.js:3818
process @ jquery-3.3.1.js:3606
setTimeout (async)
(anonymous) @ jquery-3.3.1.js:3640
fire @ jquery-3.3.1.js:3268
fireWith @ jquery-3.3.1.js:3398
fire @ jquery-3.3.1.js:3406
fire @ jquery-3.3.1.js:3268
fireWith @ jquery-3.3.1.js:3398
ready @ jquery-3.3.1.js:3878
completed @ jquery-3.3.1.js:3888
jquery-3.3.1.js:3827 Uncaught TypeError: $.fn.dataTable.Editor is not a constructor
at HTMLDocument.<anonymous> (index.php:3112)
at mightThrow (jquery-3.3.1.js:3534)
at process (jquery-3.3.1.js:3602)
I am hapless ..Please guide.
This question has an accepted answers - jump to answer
Answers
Are you using the trial version of the Editor? It may have expired. If you paid for a license you need to download Editor again and use the new downloaded files.
Kevin
Sir, I am using the editor version purchased last year and the same was working fine till yesterday morning. After, that popping above error...
However, as advised, I have downloaded latest editor i.e. 1.9 and replaced with the old ones. But still getting the same error.
Please help resolve the issue..Thanks
If you can post a link to your page we can take a look. Otherwise maybe some of the other threads with this error will help, like these:
https://datatables.net/forums/discussion/comment/154363/#Comment_154363
https://datatables.net/forums/discussion/comment/114239/#Comment_114239
Without seeing your page it will be hard to say what is causing the problem. Typically its the trial version has expired or loading jQuery multiple times or errors when loading the Editor files or initializing the Editor before the editor.js is loaded.
Kevin
Here are my web pages and files used
link info removed
I'm not seeing the
Uncaught TypeError: $.fn.dataTable.Editor is not a constructor
. I'm seeing this error:Here is the Ajax response in the developer tools:
You will need to look at you server script to determine why these errors are occurring.
Kevin
Above is the screenshot while running the web page in question.
please see.
Now it seems to be working:
screenshot removed
Maybe you need to clear your browser's cache if you are still having problems.
Kevin
I have deleted history, cleared cache and site data, restarted system and logged in again, but the error still persists...
What should I do...kthorngren Sir please suggest
The link you provided works for me in both Chrome and Safari on the Mac. Maybe try a different browser or a different computer. I don't know that link works for me but not you.
Kevin
Have tried in Ms Edge and smart phone, but to no avail...as datatable is not being loaded...Disappointed.
Also, changed the network connectivity but failed with the same error.
Sir,
may you please check the proper sequencing of my css and js files included to have access to dataTable and editor ..
Currently, I'm using Windows10 with chrome ....the site was working quite properly till yesterday in chrome and other browsers.
The sequence seems fine. I can select and click Edit. I'm asked for a password to edit.
Are you logging in with the same username you gave me?
Kevin
try removed
That works. I didn't make any changes but was able to update a record.
screenshot removed
Kevin
Let us know if you need any of the above information removed for security reasons.
Kevin
Please remove...but how could I access to datatable
I also had a conversation with hosting providers.
They told that the site is working fine but why I couldn't access the same.
What could be the reasons...
Removed some of the screenshots and login info. Let us know if there is anything else you want removed.
Do you have a firewall between you and the web site? Could be something changed there.
Kevin
Are you able to open the Editor examples?
https://editor.datatables.net/examples/simple/simple.html
Kevin
I haven't change any settings to firewall recently and as such it seems not to be blocking my web pages.
Need I replace the editor files with the old ones I downloaded at the time of purchase.
Anyone may please help to resolve my issue as I'm unable to proceed further in my web pages. I have also tried proxy IP but to no avail.
@Allen Sir please intervene
Yep, the trial ones would have expired, possibly the cause of the problem. So you need to replace those trial files with the file you now have since the purchase.
Colin
But I didn't use trial version. I just used an upgraded version from 8.1 to 9.2
Still, I need to downgrade my editor version ?
No, 1.9.2 version would be supported under your license. When you downloaded the 1.9.2 version, were you logged in with the account that made the purchase? The license is tied to that account so you need to use that. You can tell by looking at the download page - if it says "Your editor licenses" beneath the heading then those versions are licensed.
Colin
@colin The link provided (which I removed) works perfectly for me. But the site does not work for shatrughan. He is getting the following errors.
The interesting one is the first one. There seems to be something with his site not allowing him to load the page.
@shatrughan please pm @colin or @allan the link and login info for your page so they can look.
Kevin
Thanks, Kevin. I'm guessing it must be cached somewhere - either locally or remotely. @shatrughan , have you tried different browers, or in private mode, to see if it's local to the browser?
Colin
@ Colin, Sir I have tried it at chrome, Safari, Edge, IE and Opera at different systems under varying networks but getting the same error.
Tried incognito mode as well but to no avail.