It seems that the content div above the textarea interferes with the eDefTagDialog. I tested with the "Insert/edit link" button:

  1. The dialog box will be filled with "undefined" cells (PNG as attached)
  2. The generated a_href code dumps out some odd functions (below)
<a href="test_link" title="test_title" each="function (iterator) {
    var index = 0;
    try {
        this._each(function (value) {try {iterator(value, index++);} catch (e) {if (e != $continue) {throw e;}}});
    } catch (e) {
        if (e != $break) {
            throw e;
        }
    }
    return this;
}" eachSlice="function (number, iterator) {
    var index = - number, slices = [], array = this.toArray();
    while ((index += number) < array.length) {
        slices.push(array.slice(index, index + number));
    }
    return slices.map(iterator);
}" all="function (iterator) {
    var result = true;
    this.each(function (value, index) {result = result && !!(iterator || Prototype.K)(value, index);if (!result) {throw $break;}});
    return result;
}" any="function (iterator) {
    var result = false;
    this.each(function (value, index) {if (result = !!(iterator || Prototype.K)(value, index)) {throw $break;}});
    return result;
}" collect="function (iterator) {
    var results = [];
    this.each(function (value, index) {results.push((iterator || Prototype.K)(value, index));});
    return results;
}" detect="function (iterator) {
    var result;
    this.each(function (value, index) {if (iterator(value, index)) {result = value;throw $break;}});
    return result;
}" findAll="function (iterator) {
    var results = [];
    this.each(function (value, index) {if (iterator(value, index)) {results.push(value);}});
    return results;
}" grep="function (pattern, iterator) {
    var results = [];
    this.each(function (value, index) {var stringValue = value.toString();if (stringValue.match(pattern)) {results.push((iterator || Prototype.K)(value, index));}});
    return results;
}" include="function (object) {
    var found = false;
    this.each(function (value) {if (value == object) {found = true;throw $break;}});
    return found;
}" inGroupsOf="function (number, fillWith) {
    fillWith = fillWith === undefined ? null : fillWith;
    return this.eachSlice(number, function (slice) {while (slice.length < number) {slice.push(fillWith);}return slice;});
}" inject="function (memo, iterator) {
    this.each(function (value, index) {memo = iterator(memo, value, index);});
    return memo;
}" invoke="function (method) {
    var args = $A(arguments).slice(1);
    return this.map(function (value) {return value[method].apply(value, args);});
}" max="function (iterator) {
    var result;
    this.each(function (value, index) {value = (iterator || Prototype.K)(value, index);if (result == undefined || value >= result) {result = value;}});
    return result;
}" min="function (iterator) {
    var result;
    this.each(function (value, index) {value = (iterator || Prototype.K)(value, index);if (result == undefined || value < result) {result = value;}});
    return result;
}" partition="function (iterator) {
    var trues = [], falses = [];
    this.each(function (value, index) {((iterator || Prototype.K)(value, index) ? trues : falses).push(value);});
    return [trues, falses];
}" pluck="function (property) {
    var results = [];
    this.each(function (value, index) {results.push(value[property]);});
    return results;
}" reject="function (iterator) {
    var results = [];
    this.each(function (value, index) {if (!iterator(value, index)) {results.push(value);}});
    return results;
}" sortBy="function (iterator) {
    return this.map(function (value, index) {return {value:value, criteria:iterator(value, index)};}).sort(function (left, right) {var a = left.criteria, b = right.criteria;return a < b ? -1 : a > b ? 1 : 0;}).pluck("value");
}" toArray="function () {
    return [].concat(this);
}" zip="function () {
    var iterator = Prototype.K, args = $A(arguments);
    if (typeof args.last() == "function") {
        iterator = args.pop();
    }
    var collections = [this].concat(args).map($A);
    return this.map(function (value, index) {return iterator(collections.pluck(index));});
}" size="function () {
    return this.length;
}" inspect="function () {
    return "[" + this.map(Object.inspect).join(", ") + "]";
}" find="function (iterator) {
    var result;
    this.each(function (value, index) {if (iterator(value, index)) {result = value;throw $break;}});
    return result;
}" select="function (iterator) {
    var results = [];
    this.each(function (value, index) {if (iterator(value, index)) {results.push(value);}});
    return results;
}" member="function (object) {
    var found = false;
    this.each(function (value) {if (value == object) {found = true;throw $break;}});
    return found;
}" entries="function () {
    return this.map();
}" _reverse="function reverse() {
    [native code]
}" _each="function (iterator) {
    for (var i = 0, length = this.length; i < length; i++) {
        iterator(this[i]);
    }
}" clear="function () {
    this.length = 0;
    return this;
}" first="function () {
    return this[0];
}" last="function () {
    return this[this.length - 1];
}" compact="function () {
    return this.select(function (value) {return value != null;});
}" flatten="function () {
    return this.inject([], function (array, value) {return array.concat(value && value.constructor == Array ? value.flatten() : [value]);});
}" without="function () {
    var values = $A(arguments);
    return this.select(function (value) {return !values.include(value);});
}" reduce="function () {
    return this.length > 1 ? this : this[0];
}" uniq="function () {
    return this.inject([], function (array, value) {return array.include(value) ? array : array.concat([value]);});
}" clone="function () {
    return [].concat(this);
}" call="function () {
    var args = arguments;
    this.each(function (f) {f.apply(this, args);});
}" removeDuplicates="function () {
    for (i = 1; i < this.length; i++) {
        if (this[i][0] == this[i - 1][0]) {
            this.splice(i, 1);
        }
    }
}" empty="function () {
    for (i = 0; i <= this.length; i++) {
        this.shift();
    }
}">test</a>

I applied some stop-gap fixes (below). I don't think I have located the root cause but just to avoid inserting the odd functions to the dialog box and the generated code.

17:26:43,# diff -C 5 default_buttons_functions.js default_buttons_functions.js.~1~ 
*** default_buttons_functions.js        Mon Jul  2 17:48:19 2007
--- default_buttons_functions.js.~1~    Mon Jul  2 17:08:53 2007
***************
*** 55,67 ****
  //return html for the given tag. attributes having value=null are not printed.
  function eDefHTML(tag, innerHTML, attributes) {
    var attributes = attributes||[];
    var html = '<'+ tag;
    for (var i in attributes) {
!     if (typeof(attributes[i]) != 'function') {
!        html += attributes[i] == null ? '' : ' '+ i +'="'+ attributes[i] +'"';
!     }
    }
    html += editor.inArray(tag, ['img', 'input', 'hr', 'br']) ? ' />' : '>'+ innerHTML +'</'+ tag +'>';
    return html;
  }
  
--- 55,65 ----
  //return html for the given tag. attributes having value=null are not printed.
  function eDefHTML(tag, innerHTML, attributes) {
    var attributes = attributes||[];
    var html = '<'+ tag;
    for (var i in attributes) {
!     html += attributes[i] == null ? '' : ' '+ i +'="'+ attributes[i] +'"';
    }
    html += editor.inArray(tag, ['img', 'input', 'hr', 'br']) ? ' />' : '>'+ innerHTML +'</'+ tag +'>';
    return html;
  }
  
***************
*** 89,99 ****
  }
  
  //return a table row containing the cells(array of strings or objects(data:string, attributes:object))
  function eDefRow(cells, attributes) {
    var html = '';
!   for (var i=0; i<cells.length; i++) {
      html += typeof(cells[i]) == 'string'  ? eDefHTML('td', cells[i]) : eDefHTML('td', cells[i]['data'], cells[i]['attributes']);
    }
    return eDefHTML('tr', html, attributes);
  }
  function eDefTable(rows, attributes) {
--- 87,97 ----
  }
  
  //return a table row containing the cells(array of strings or objects(data:string, attributes:object))
  function eDefRow(cells, attributes) {
    var html = '';
!   for (var i in cells) {
      html += typeof(cells[i]) == 'string'  ? eDefHTML('td', cells[i]) : eDefHTML('td', cells[i]['data'], cells[i]['attributes']);
    }
    return eDefHTML('tr', html, attributes);
  }
  function eDefTable(rows, attributes) {

I ain't sure whether this is specific to my site (as I have installed quite a number of additional modules), or generic to also a bare-bone Drupal 5.1.

Many thks,
Peter.

CommentFileSizeAuthor
table.png15.5 KBmine@subnet142.com

Comments

dindon’s picture

i have the same problem when editing existing node.

Any patch/fix?

mine@subnet142.com’s picture

I'll try to provide a patch later on when I am done with my project (...I don't know how to make patch yet...), hopefully in a few weeks...

ufku’s picture

i wonder how actually you are using eDefTagDialog. can you please post the button content?

ufku’s picture

Status: Active » Closed (fixed)