Question

I'm getting an error with an SDK2.0 app using a rally custom grid:

It only errors with IE (current), and it does not error if I run it locally, only when I install it in Rally and run it.

I don't know if its a Rally issue, or a EXTJS issue.

SCRIPT5007: Unable to get value of the property 'modelField': object is null or undefined sdk.js, line 4 character 1276692

The code that failed:

if(e.modelField&&e.modelField.hidden)

Context around that error:

{xtype:"rallytextfield",allowBlank:false,removeNameAttribute:true}}},PortfolioItem:function(){return{hidden:true}},AttributeType:function(b){return a.apply(Rally.ui.grid.FieldColumnFactory.defaultRenderer(b),{sortable:false})}})})();(function(){var a=window.Ext4||window.Ext;var b=function(g,e){var d=g.text;var c=e.text;if(d>c){return 1}if(d<c){return -1}return 0};a.define("Rally.ui.grid.ColumnBuilder",{requires:["Ext.Array","Ext.util.Format","Rally.ui.grid.FieldColumnFactory"],constructor:function(){this.defaultColumns=[];this.autoAddAllModelFieldsAsColumns=true},withDefaultColumns:function(c){if(a.isArray(c)){this.defaultColumns=this.defaultColumns.concat(c)}return this},withSortableColumns:function(c){this.sortable=c;return this},shouldAutoAddAllModelFieldsAsColumns:function(c){this.autoAddAllModelFieldsAsColumns=c;return this},build:function(d){var e=a.Array.map(this.defaultColumns,function(g){if(a.isString(g)){return Rally.ui.grid.FieldColumnFactory.getColumnConfigFromField(d.getField(g),this.sortable)}return g},this);if(this.autoAddAllModelFieldsAsColumns){var c=this._buildModelColumns(d,this.defaultColumns,e);e=e.concat(c)}this._removeHiddenColumns(e);return this._stripTagsFromColumnText(e)},_removeHiddenColumns:function(d){for(var c=d.length-1;c>0;c--){var e=d[c];if(e.modelField&&e.modelField.hidden){a.Array.erase(d,c,1)}}}

Not sure what other guidance I can provide to help locate this issue.

Was it helpful?

Solution

The code was a bit large, so I started to do some divide and conquer before I posted it and I found the cause in my code, though probably not the root cause:

In my columnCfgs when adding the rallygrid, I had a trailing ',' on the last entry.

The really annoying thing is this works in all browsers locally, but only fails in IE on Rally with a super obscure error, so its really hard to chase down...even my JavaScript syntax highlighter did not warn me...

I suspect this is actually a problem in either Rally or EXT-JS code where IE is just really finicky...

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top