Uncaught TypeError: $.fn.dataTable.Editor is not a constructor

Uncaught TypeError: $.fn.dataTable.Editor is not a constructor

shatrughanshatrughan Posts: 87Questions: 16Answers: 0

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

«1

Answers

  • kthorngrenkthorngren Posts: 21,166Questions: 26Answers: 4,921

    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

  • shatrughanshatrughan Posts: 87Questions: 16Answers: 0

    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

  • kthorngrenkthorngren Posts: 21,166Questions: 26Answers: 4,921

    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

  • shatrughanshatrughan Posts: 87Questions: 16Answers: 0
    edited December 2019

    Here are my web pages and files used

    link info removed

  • kthorngrenkthorngren Posts: 21,166Questions: 26Answers: 4,921

    I'm not seeing the Uncaught TypeError: $.fn.dataTable.Editor is not a constructor. I'm seeing this error:

    DataTables warning: table id=example - Invalid JSON response. For more information about this error, please see http://datatables.net/tn/1

    Here is the Ajax response in the developer tools:

    <br />
    <b>Warning</b>:  require(/home/u644087996/domains/e-reporting.in/public_html/Data/lib/Editor.php): failed to open stream: No such file or directory in <b>/home/u644087996/domains/e-reporting.in/public_html/Data/lib/Bootstrap.php</b> on line <b>45</b><br />
    <br />
    <b>Warning</b>:  require(/home/u644087996/domains/e-reporting.in/public_html/Data/lib/Editor.php): failed to open stream: No such file or directory in <b>/home/u644087996/domains/e-reporting.in/public_html/Data/lib/Bootstrap.php</b> on line <b>45</b><br />
    <br />
    <b>Fatal error</b>:  require(): Failed opening required '/home/u644087996/domains/e-reporting.in/public_html/Data/lib/Editor.php' (include_path='.:/opt/alt/php72/usr/share/pear') in <b>/home/u644087996/domains/e-reporting.in/public_html/Data/lib/Bootstrap.php</b> on line <b>45</b><br />
    

    You will need to look at you server script to determine why these errors are occurring.

    Kevin

  • shatrughanshatrughan Posts: 87Questions: 16Answers: 0

    Above is the screenshot while running the web page in question.
    please see.

  • kthorngrenkthorngren Posts: 21,166Questions: 26Answers: 4,921
    edited December 2019

    Now it seems to be working:

    screenshot removed

    Maybe you need to clear your browser's cache if you are still having problems.

    Kevin

  • shatrughanshatrughan Posts: 87Questions: 16Answers: 0

    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

  • kthorngrenkthorngren Posts: 21,166Questions: 26Answers: 4,921

    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

  • shatrughanshatrughan Posts: 87Questions: 16Answers: 0

    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.

  • shatrughanshatrughan Posts: 87Questions: 16Answers: 0

    Sir,
    may you please check the proper sequencing of my css and js files included to have access to dataTable and editor ..

  • shatrughanshatrughan Posts: 87Questions: 16Answers: 0

    Currently, I'm using Windows10 with chrome ....the site was working quite properly till yesterday in chrome and other browsers.

  • kthorngrenkthorngren Posts: 21,166Questions: 26Answers: 4,921

    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

  • shatrughanshatrughan Posts: 87Questions: 16Answers: 0
    edited December 2019

    try removed

  • kthorngrenkthorngren Posts: 21,166Questions: 26Answers: 4,921
    edited December 2019

    That works. I didn't make any changes but was able to update a record.

    screenshot removed

    Kevin

  • kthorngrenkthorngren Posts: 21,166Questions: 26Answers: 4,921

    Let us know if you need any of the above information removed for security reasons.

    Kevin

  • shatrughanshatrughan Posts: 87Questions: 16Answers: 0

    Please remove...but how could I access to datatable

  • shatrughanshatrughan Posts: 87Questions: 16Answers: 0

    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...

  • kthorngrenkthorngren Posts: 21,166Questions: 26Answers: 4,921

    Removed some of the screenshots and login info. Let us know if there is anything else you want removed.

    They told that the site is working fine but why I couldn't access the same.

    Do you have a firewall between you and the web site? Could be something changed there.

    Kevin

  • kthorngrenkthorngren Posts: 21,166Questions: 26Answers: 4,921

    Are you able to open the Editor examples?
    https://editor.datatables.net/examples/simple/simple.html

    Kevin

  • shatrughanshatrughan Posts: 87Questions: 16Answers: 0

    I haven't change any settings to firewall recently and as such it seems not to be blocking my web pages.

  • shatrughanshatrughan Posts: 87Questions: 16Answers: 0

    Need I replace the editor files with the old ones I downloaded at the time of purchase.

  • shatrughanshatrughan Posts: 87Questions: 16Answers: 0

    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

  • colincolin Posts: 15,237Questions: 1Answers: 2,598

    Need I replace the editor files with the old ones I downloaded at the time of purchase.

    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

  • shatrughanshatrughan Posts: 87Questions: 16Answers: 0

    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 ?

  • colincolin Posts: 15,237Questions: 1Answers: 2,598

    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

  • kthorngrenkthorngren Posts: 21,166Questions: 26Answers: 4,921

    @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

  • colincolin Posts: 15,237Questions: 1Answers: 2,598

    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

  • shatrughanshatrughan Posts: 87Questions: 16Answers: 0

    @ Colin, Sir I have tried it at chrome, Safari, Edge, IE and Opera at different systems under varying networks but getting the same error.

  • shatrughanshatrughan Posts: 87Questions: 16Answers: 0

    Tried incognito mode as well but to no avail.

This discussion has been closed.