Bug Editor 1.5.1 + Standalone

Bug Editor 1.5.1 + Standalone

perrotinperrotin Posts: 39Questions: 9Answers: 1
edited September 2015 in Bug reports

Using Editor 1.5.1 and dataTable1.10.9 in standalone mode,(no table option), I've got this error when I try to set the value of a select field

Uncaught TypeError: Cannot read property 'length' of undefined

Editor.Field._multiValueCheck @ dataTables.editor.js:531

Editor.Field.set @ dataTables.editor.js:424

Editor.Field.val @ dataTables.editor.js:448

The error happens, when variable 'ids' is undefined line l.530 :

  for ( var i=0 ; i<ids.length ; i++ ) {

I manage to solve the issue wrapping the entire function in an if(typeof ids != 'undefined')
statement but not sur it's safe for the rest.

Replies

  • allanallan Posts: 61,649Questions: 1Answers: 10,093 Site admin

    Hi,

    Are you able to give me a link to a test page showing the issue please?

    This example shows a select field being used inline with a standalone editor without error.

    Allan

  • perrotinperrotin Posts: 39Questions: 9Answers: 1
    edited September 2015

    Hi,

    I manage to solve the problem.

    I'm trying to develop an extension in order to be able to use editor in standalone mode to edit a given entry of a table but without the table (with inline editing).

    The purpose is to use the same php process page to update individual row on specific pages.

    I was tring to set the values of all fields without specifiing the row that I was editing.

    editor.field(fieldName).val(value);

    adding this line before solved my issue:

    editor.edit( rowID ,false ).close();

    Thanks for your answer

This discussion has been closed.