View Full Version : Error on rendering a grid

24 Apr 2007, 8:45 AM
I have a grid in my script that until Ext 1.0 a3 worked perfectly, now after upgrading to Ext 1.0. stable it won't render.
I don't understand what is it cause i have other grids in the same script that render without problems and have almost the same configuration.

I got this error in firebug:

b is not defined
[Break on this error] Ext.DomHelper=function(){var _1=null;var _2=/^(?:br|frame|hr|img|input|link|meta...at ext-all.js line 9

this is my css and html code

.user-module-table {

overflow: hidden;


#config-entity-grid, #config-datetime-grid, #config-fields-grid{

width: 400px;

height: 150px;


<div id="config-fields-pnl">

<div class="config-wide-content-pnl config-content-pnl">

<h3>Configurazione dei campi</h3>

<div id="config-fields-grid" class="user-module-table"></div>

<div class="user-tip-box"><p>Selezionare il campo nella tabella e impostare i parametri nel panello "Dettaglio campi"</p></div>


div#config-fields-grid is my grid container. There is a wrapper div with invisibility set to hidden that contains all grids and don't cause problems with other grids placed inside.

js code is:

var store = new Ext.data.Store({

proxy: new Ext.data.MemoryProxy(subfields),

reader: new Ext.data.ArrayReader({id: 0}, [

{name: 'index', mapping: 'index'},

{name: 'name', mapping: 'name'},

{name: 'type', mapping: 'type'},

{name: 'sfield', mapping: 'sfield'}




var cmod = new Ext.grid.ColumnModel([

{header: 'Id', width: 50, sortable: true, dataIndex: 'index'},

{header: 'Nome', width: 125, sortable: true, dataIndex: 'name'},

{header: 'Tipo', width: 100, sortable: true, dataIndex: 'type'},

{header: 'Campo speciale', width: 100, sortable: true, dataIndex: 'sfield'}


var grid = new Ext.grid.Grid('config-fields-grid',{ds:store, cm:cmod});



EDIT: this is the call stack provided from firebug:

DomHelper(Object id=ext-gen406 tag=div, null)ext-all.js (line 9)
DomHelper(body#ext-gen6.ext-gecko, Object id=ext-gen406 tag=div, undefined)ext-all.js (line 9)
Layer(Object dh=Object shadow=true, undefined)ext-all.js (line 99)
StatusProxy(undefined)ext-all.js (line 57)
DragSource(div#ext-gen382.x-grid-header, undefined)ext-all.js (line 59)
DragZone(div#ext-gen382.x-grid-header, undefined)ext-all.js (line 63)
HeaderDragZone(Object container=Object id=config-fields-grid, div#ext-gen382.x-grid-header, div#ext-gen385.x-grid-header)ext-all.js (line 231)
GridView()ext-all.js (line 229)
Grid()ext-all.js (line 225)
successValidationsRequest(Object tId=2 status=200 statusText=OK)main.js (line 561)
apply()ext-yui-adapter.j... (line 9)
setProgId(Object conn=XMLHttpRequest tId=2, Object timeout=50000, undefined)yui-utilities.js (line 15)

I hope someone can help me solve the problem.


24 Apr 2007, 10:06 AM
Use the ext-all-debug file and see if you can determine what element is choking DomHelper. This may help you find the issue.

24 Apr 2007, 10:49 AM
I've used it and I have determined that createDom is the function where the code breaks, but is not helpful to me.

I can only say that is a bug and I'll report it. It seemse that the only way to have it working again is to downgrade my ext version to the last beta release. This application have request hours of hard developing during last weeks and it was everything working before the upgrade to ext 1.0. stable.
Sincerly, I haven't time to debug ext itself to understand what is wrong. I hope ext team will fix it.

24 Apr 2007, 10:52 AM
I have exposed my problem at this thread http://extjs.com/forum/showthread.php?p=25720#post25720

More of I wrote there is that code breaks at line 94. Firebug message is

b is not defined
createDom(Object id=ext-gen406 tag=div, null)ext-all-debug.js (line 94)
append(body#ext-gen6.ext-gecko, Object id=ext-gen406 tag=div, undefined)ext-all-debug.js (line 316)
Layer(Object dh=Object shadow=true, undefined)ext-all-debug.js (line 11091)
StatusProxy(undefined)ext-all-debug.js (line 8751)
DragSource(div#ext-gen382.x-grid-header, undefined)ext-all-debug.js (line 8865)
DragZone(div#ext-gen382.x-grid-header, undefined)ext-all-debug.js (line 9162)
HeaderDragZone(Object container=Object id=config-fields-grid, div#ext-gen382.x-grid-header, div#ext-gen385.x-grid-header)ext-all-debug.js (line 25763)
render()ext-all-debug.js (line 25552)
render()ext-all-debug.js (line 24074)
successValidationsRequest(Object tId=2 status=200 statusText=OK)main.js (line 560)
apply()ext-yui-adapter.j... (line 9)
setProgId(Object conn=XMLHttpRequest tId=2, Object timeout=50000, undefined)yui-utilities.js (line 15)
setProgId()yui-utilities.js (line 15)
[Break on this error] createDom(cn[i], b);

if helpful i can send the whole script via email.

EDIT: the error fires when grid.render() is called.

24 Apr 2007, 1:20 PM
Please do not start multiple threads for the same issue - you're not going to get an answer any faster by posting multiple times. I have merged your other thread with this one.

24 Apr 2007, 2:24 PM
I started a new thread cause I would report the problem as a bug (under the Bugs forum).

I've reinstalled Ext 1.0 a3 and everything works again as expected.
The same with Ext 1.0 b1. The problem has come out with the stable version.

25 Apr 2007, 1:41 AM
Just to know. There isn't some kind of launchpad or bugtrace for ext where I can report this bug?

This is the first time we develop something using Ext and we cannot upgrade to the 1.0 stable version for this bug.
We are testing Ext for our major product and sincerly we are not glad at all of this situation.
We haven't bought a premium support yet 'cause our tests are not finished.
So, just to understand. If we buy a premium support there is a chance for this bug to be considered?
Let me understand, 'cause it depends on my opinion if our company will rely or not on Ext for our internal development, and of course become or not your customer.

25 Apr 2007, 5:09 AM
I have debugged a little and I found the problem.

Previously in the script i had this instruction:

Ext.DomHelper.useDom = true;

to prevent the problem with ie when appending option elements to a select

It seems that usually grid.render() don't call DomHelper.createDom(), but in this very case it does. I dunno why.
For some reason having set Ext.DomHelper.useDom to true fires the bug discussed (almost a monologue) in this thread.

Setting again Ext.DomHelper.useDom to false makes everything works as expected.

So the lesson is: from ext 1.0 stable if you have set Ext.DomHelper.useDom = true; somewhere set it to false before grid.render();

This didn't happen until the last beta version.

I'm always willing to understand what will happen if I were a premium customer in a situation like this???

25 Apr 2007, 8:06 AM
This was a bug and was fixed recently in SVN.

I'm always willing to understand what will happen if I were a premium customer in a situation like this???
If you were a premium customer, you would have access to the fix in SVN when it's made, rather than waiting for the new build. There is no charge for reporting a bug. Regardless of which forum the issue is reported in, there still has to be verification that it's truly a bug. That means being able to repro the problem in order to verify/understand what's happening. For more details regarding what you can expect if you purchase support, please see this (http://extjs.com/ext-store). If you need further clarification of these options, please feel free to email support@extjs.com