diff --git a/etemplate/js/et2_core_widget.js b/etemplate/js/et2_core_widget.js index 2b9b737c16..9f5da73b31 100644 --- a/etemplate/js/et2_core_widget.js +++ b/etemplate/js/et2_core_widget.js @@ -562,6 +562,13 @@ var et2_widget = Class.extend({ var modifications = this.getArrayMgr("modifications"); if(modifications && _node.getAttribute("id")) { var entry = modifications.getEntry(_node.getAttribute("id")); + if(entry == null) + { + // Try again, but skip the fancy stuff + // TODO: Figure out why the getEntry() call doesn't always work + var entry = modifications.data[_node.getAttribute("id")]; + if(entry) et2_debug("warn", "getEntry("+_node.getAttribute("id")+") failed, but the data is there.", modifications, entry); + } if(entry && entry.type) { _nodeName = attributes["type"] = entry.type @@ -794,6 +801,14 @@ var et2_widget = Class.extend({ var app = egw.getAppName() == 'egroupware' ? 'phpgwapi' : egw.getAppName(); //console.warn("Unable to find template application, using %s", app); return app; + }, + + /** + * Returns the path into the data array. By default, array manager takes care of + * this, but some extensions need to override this + */ + getPath: function() { + return this.getArrayManager("content").getPath(); } }); diff --git a/etemplate/js/etemplate2.js b/etemplate/js/etemplate2.js index 114ed8f38d..5bbb35d66b 100644 --- a/etemplate/js/etemplate2.js +++ b/etemplate/js/etemplate2.js @@ -35,6 +35,7 @@ et2_widget_progress; et2_extension_nextmatch; + et2_extension_customfields; // Requirements for the etemplate2 object et2_core_common; @@ -241,7 +242,7 @@ etemplate2.prototype.getValues = function(_root) } // Get the path to the node we have to store the value at - var path = _widget.getArrayMgr("content").getPath(); + var path = _widget.getPath(); // check if id contains a hierachical name, eg. "button[save]" var id = _widget.id;