Random errors in editor initialization after DT/Editor upgrade

Random errors in editor initialization after DT/Editor upgrade

yetyet Posts: 43Questions: 17Answers: 1

We're currently updating from DT 1.0.15 -> 1.0.21, Editor 1.6.2 -> 1.9.4

We receive random errors during the initialization of the editor.

One is

dataTables.editor.js:4509 Uncaught TypeError: Cannot read property 'nTable' of undefined

        $(document)
            .on('init.dt.dte' + this.s.unique, function(e, settings, json) {
                // Attempt to attach to a DataTable automatically when the table is
                // initialised
                if (that.s.table && settings.nTable === $(that.s.table).get(0)) {
                    settings._editor = that;
                }
            })

and this one

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

    if (typeof EDIT_FORM !== 'undefined') {
        console.log('Initalizing Editor EDITOR_FORM')
        console.log(EDIT_FORM);
        var edit_editor = new $.fn.dataTable.Editor( {
            ajax:  '@@kataster-update',
            table: '#listing',
            i18n: language_editor,
            fields: EDIT_FORM
        })
    }

This has not happened with the old versions...any idea?

Answers

  • colincolin Posts: 15,240Questions: 1Answers: 2,599

    It would say the second one if it couldn't find the Editor source library on the page. Please could you run the debugger on that page, upload your data and send us the link - that way we can see what it thinks is installed.

    Colin

This discussion has been closed.