Cannot read property 'multiEditable' of undefined
Cannot read property 'multiEditable' of undefined
I'm experiencing the problem described in this post: https://datatables.net/forums/discussion/42274/cannot-read-property-multieditable-of-undefined and I've included a test case here: http://live.datatables.net/coguruka/5/edit?js,console,output
When adding a series of fields to an editor form for creation, subsequent invocations of that form for editing after clearing the fields results in the error, "Cannot read property 'multiEditable' of undefined'.
The edit form can be used without problem if used BEFORE the create form. It can also be used if the additional fields are not cleared. However, once the fields have been added, the edit form can not be used after the fields have been cleared.
In my particular case the fields are added so the user can create an initial child record of a newly created parent record. When a parent record is edited, though, there is no child record to be created or edited so the fields are "cleared" from the form.
In my environment, I'm using editor 1.6.2.
I hope the test case is adequate. I copied an existing editor example and am unable to identify the version of editor being used but it results in a similar error. The error displayed in the live console is "Script error." When looking at the browser console, though, the error displayed is as follows:
dataTables.editor.min.js:439 Uncaught TypeError: Cannot read property 'multiEditable' of undefined
at f._multiInfo (dataTables.editor.min.js:439)
at f._postopen (dataTables.editor.min.js:443)
at f.open (dataTables.editor.min.js:315)
at Object.maybeOpen (dataTables.editor.min.js:403)
at f.edit (dataTables.editor.min.js:275)
at _Api.action (dataTables.editor.min.js:603)
at action (dataTables.buttons.js:515)
at HTMLAnchorElement.<anonymous> (dataTables.buttons.js:530)
at HTMLAnchorElement.dispatch (jquery-1.11.3.min.js:4)
at HTMLAnchorElement.r.handle (jquery-1.11.3.min.js:4)
Answers
Thanks for the test case! I completely agree - that does look like a bug. Let me look into it and I'll post back here.
Allan