Issue Bug Closed

#13554Javascript errors in grid view in IE7

Nils Blattner 03/02/11, 18:17 updated 12/10/13, 01:05

Description

Hi there

Version: TYPO3 4.5.2
I just spent a lot of time fixing an issue in workspaces and would like to share my findings:

When clicking on any change in the workspace module in IE, you get an error saying “fly(…) is not an object”.
This results from the function ‘getTarget’ of Ext.EventObject.
It does not check whether Ext.grid.GridView.fly() returns an object or not.

The reason behind this is, that the HTML that is generated for the GroupingView is not valid XHTML and therefore not parsed!
IE8, Firefox etc. ignore this and are able to work properly anyway.

There is a quick fix:
ext-all-debug.js at line 5055

getTarget : function(selector, maxDepth, returnEl){
/* MODIFIED nb@cabag.ch start /
if (selector) {
var trg = Ext.fly(this.target);
if (trg) {
return trg.findParent(selector, maxDepth, returnEl);
} else {
return this.target
}
} else {
return (returnEl ? Ext.get(this.target) : this.target);
}
//return selector ? Ext.fly(this.target).findParent(selector, maxDepth, returnEl) : (returnEl ? Ext.get(this.target) : this.target);
/
MODIFIED nb@cabag.ch end */
},

I also changed two JavaScripts in workspaces, however I am not sure if they actually contribute something to the solution.
They were a first attempt at fixing the issue while rendering, but didn’t solve the problem.
I will find out tomorrow if they actually contribute to the solution or not.

To sum it up:

The rendered HTML must become valid XHTML.
In the mean time a modified Ext-js hides the underlying problem.

More tomorrow

Regards Nils

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.