Max call stack size exceeded - DHTMLX 4.12 - Grid Load Error

I have tried to load with the php connector, as well as the direct xml produced by the php file and I get the same error when I use the load() function.

Error

Uncaught RangeError: Maximum call stack size exceeded dhtmlx.js:9 dhtmlXGridObject.loaddhtmlx.js:9
dhtmlXGridObject.loaddhtmlx.js:9 (this is repeated 100+ times)

Any suggestions?

Here is my code

budgetGrid = dhxLayout.cells("b").attachGrid();
	
	budgetGrid.setImagePath("../codebase.412/sources/dhtmlxGrid/codebase/imgs/dhxgrid_terrace");          //the path to images required by grid 
    budgetGrid.setHeader("ID,Line Item,Description,Notes,Amount,Date");//the headers of columns  
    budgetGrid.setColumnIds("id,lineItem,description,notes,amount,date");
    budgetGrid.setInitWidths("100,250,350,350,100,200");          //the widths of columns  
    budgetGrid.setColAlign("left,left,left,left,left,left");       //the alignment of columns   
    budgetGrid.setColTypes("ro,ed,ed,ed,ed,ed");                //the types of columns  
    budgetGrid.setColSorting("int,str,str,str,int,int");          //the sorting types  
    
    budgetGrid.init();      //finishes initialization and renders the grid on the page 
	
    //budgetGrid.load("loadBudgetGrid.php?id=0");
    budgetGrid.load("budget.xml", "xml");

Unfortunately the issue cannot be reproduced locally with the provided code.
If the problem still occurs for you please, provide with a generated xml or with a demo link/complete demo, where the problem can be reproduced locally.

The problem arises when you attempt to attach a grid and load data via a php (with xml output) inside of another element.

For example, if I attach a grid to a layout cell and use the load() function, it will Max out. If I attach a URL to that same layout cell with an html file and attach the grid to a

the load() function works perfectly.

I’m running into the same issue with attaching a grid to a window. It maxes out.

[code]dhxLayout = new dhtmlXLayoutObject({

	    parent:     document.body,    // id/object, parent container where the layout will be located
	    pattern:    "2U",           // string, layout's pattern
	    skin:       "dhx_terrace",  // string, optional, "dhx_skyblue", "dhx_web", "dhx_terrace"
	 
	    cells: [    // optional, cells configuration according to the pattern
	                // you can specify only the cells you want to configure
	                // all params are optional
	        {
	            id:             "a",   		// id of the cell you want to configure
	            header:         false,      // hide header on init
	            width:          190,        // cell init width
	           
	        },
	        {
	            id:             "b",    	// id of the cell you want to configure
	            header:         false,      // hide header on init
	           
	        }
	        
	    ] 
	});
			
		
	dhxLayout.attachHeader("header");
	dhxLayout.attachFooter("footer");

addUsersToGroupUpperForm = [
{type:“settings”, position:“label-left”, labelWidth: “60”, inputWidth: “200”, noteWidth: “100” },
{type: “block”, width: “auto”, list:[
{type: “block”, width: “auto”, list:[
{type: “input”, name: “search”, label: “Search:” },
{type: “newcolumn”, offset: 10},
{type: “button”, name:“goSearch”, value:“Search”},
{type: “newcolumn”, offset: 10},
{type: “button”, name:“clearSearch”, value:“Clear Search”},
{type: “newcolumn”, offset: 10},
{type: “button”, name:“fullCardView”, value:“Full Card View”},
{type: “newcolumn”, offset: 10},
{type: “button”, name:“printRoster”, value:“Print Roster”},
]},
{type: “block”, width: “auto”, list:[
{type: “select”, name: “grade”, label: “Grade:”, connector: “grade.php?type=all”, value: “”},
{type: “newcolumn”, offset: 10},
{type: “block”, width: “auto”, list:[
{type: “radio”, label: “Male”, name: “gender”, value: “M”, labelWidth: “50”, inputWidth: “30”, position:“label-right”},
{type: “newcolumn”, offset: 10},
{type: “radio”, label: “Female”, name: “gender”, value: “F”, labelWidth: “50”, inputWidth: “30”, position:“label-right”},
{type: “newcolumn”, offset: 20},
{type: “radio”, label: “Students”, name: “status”, value: “student”, labelWidth: “50”, inputWidth: “30”, position:“label-right”},
{type: “newcolumn”, offset: 10},
{type: “radio”, label: “Adults”, name: “status”, value: “adult”, labelWidth: “50”, inputWidth: “30”, position:“label-right”},
]}
]},

         {type: "newcolumn", offset: 175},
         {type: "button", name:"saveGroup", value:"Save"},
         {type: "newcolumn", offset: 45},
         {type: "button", name:"cancel", value:"Cancel"},
    ]} 

];

addUsers = dhxLayout.cells(“b”).attachLayout({

	    //parent:     "",    // id/object, parent container where the layout will be located
	    pattern:    "3T",           // string, layout's pattern
	    skin:       "dhx_terrace",  // string, optional, "dhx_skyblue", "dhx_web", "dhx_terrace"
	 
	    cells: [    // optional, cells configuration according to the pattern
	                // you can specify only the cells you want to configure
	                // all params are optional
	        {
	            id:             "a",   		// id of the cell you want to configure
	            header:         false,      // hide header on init
	            height:			80,
	            
	           
	        },
	        {
	            id:             "b",    	// id of the cell you want to configure
	            header:         false,      // hide header on init
	            width:          700,        // cell init width
	            height:			"100%"
	           
	        },
	        {
	            id:             "c",    	// id of the cell you want to configure
	            header:         false,      // hide header on init
	           
	        }
	        
	    ] 
	});

addUsersForm = addUsers.cells("a").attachForm(addUsersToGroupUpperForm);

rosterView = addUsers.cells("b").attachDataView(dv_rosterList);
rosterView.load("loadEventRoster.php?id="+eventID);

groupView = addUsers.cells("c").attachDataView(dv_rosterList);
groupView.load("loadEventGroup.php?id="+eventID);

addUsersForm.attachEvent("onButtonClick", function(id) {
    	
		if (id == "printRoster") {
			
			var dhxWins = new dhtmlXWindows("terrace");
			dhxWins.createWindow("eventRoster", 500, 175, 650, 325);
			dhxWins.window("eventRoster").setText("Event Roster");
			
			ERgrid = dhxWins.window("eventRoster").attachGrid();
			
			ERgrid.setImagePath("../codebase.412/sources/dhtmlxGrid/codebase/imgs/dhxgrid_terrace");          //the path to images required by grid 
			ERgrid.setHeader("#, Last Name, First Name, Gender");//the headers of columns  
			ERgrid.setColumnIds("num,last_name,first_name,gender");
			ERgrid.setInitWidths("75,200,200,100");          //the widths of columns  
			ERgrid.setColAlign("left,left,left,left");       //the alignment of columns   
			ERgrid.setColTypes("ed,ed,ed,ed");                //the types of columns  
			ERgrid.setColSorting("int,str,str,str");          //the sorting types  
		    
			ERgrid.init();      //finishes initialization and renders the grid on the page 
			
			ERgrid.load("loadRosterGrid.php?id="+eventID);
			
		}

});

[/code]

Here is the XML of the data to fill the grid.

<?xml version='1.0' encoding='utf-8' ?><rows><row id='262'><cell><![CDATA[1]]></cell><cell><![CDATA[Barr]]></cell><cell><![CDATA[Jackson]]></cell><cell><![CDATA[M]]></cell></row>
<row id='254'><cell><![CDATA[2]]></cell><cell><![CDATA[Bedgood]]></cell><cell><![CDATA[Crystal]]></cell><cell><![CDATA[F]]></cell></row>
<row id='253'><cell><![CDATA[3]]></cell><cell><![CDATA[Bedgood]]></cell><cell><![CDATA[Payton]]></cell><cell><![CDATA[M]]></cell></row>
<row id='250'><cell><![CDATA[4]]></cell><cell><![CDATA[call]]></cell><cell><![CDATA[chandler]]></cell><cell><![CDATA[F]]></cell></row>
<row id='249'><cell><![CDATA[5]]></cell><cell><![CDATA[call]]></cell><cell><![CDATA[sarah kate ]]></cell><cell><![CDATA[F]]></cell></row>
<row id='246'><cell><![CDATA[6]]></cell><cell><![CDATA[DeMersseman]]></cell><cell><![CDATA[Jake]]></cell><cell><![CDATA[M]]></cell></row>
<row id='245'><cell><![CDATA[7]]></cell><cell><![CDATA[DeMersseman]]></cell><cell><![CDATA[Zachary]]></cell><cell><![CDATA[M]]></cell></row>
<row id='255'><cell><![CDATA[8]]></cell><cell><![CDATA[Folsom]]></cell><cell><![CDATA[Madison]]></cell><cell><![CDATA[F]]></cell></row>
<row id='277'><cell><![CDATA[9]]></cell><cell><![CDATA[Hall]]></cell><cell><![CDATA[Georgia ]]></cell><cell><![CDATA[F]]></cell></row>
<row id='251'><cell><![CDATA[10]]></cell><cell><![CDATA[Hall]]></cell><cell><![CDATA[Gracie ]]></cell><cell><![CDATA[F]]></cell></row>
<row id='259'><cell><![CDATA[11]]></cell><cell><![CDATA[Holley]]></cell><cell><![CDATA[Carter]]></cell><cell><![CDATA[M]]></cell></row>
<row id='242'><cell><![CDATA[12]]></cell><cell><![CDATA[Irwin]]></cell><cell><![CDATA[Casey]]></cell><cell><![CDATA[F]]></cell></row>
<row id='264'><cell><![CDATA[13]]></cell><cell><![CDATA[Loughran]]></cell><cell><![CDATA[Patrick]]></cell><cell><![CDATA[M]]></cell></row>
<row id='241'><cell><![CDATA[14]]></cell><cell><![CDATA[Pickard]]></cell><cell><![CDATA[Brant]]></cell><cell><![CDATA[M]]></cell></row>
<row id='256'><cell><![CDATA[15]]></cell><cell><![CDATA[Posse]]></cell><cell><![CDATA[Madeline]]></cell><cell><![CDATA[F]]></cell></row>
<row id='270'><cell><![CDATA[16]]></cell><cell><![CDATA[Sanderlin]]></cell><cell><![CDATA[Gracyn]]></cell><cell><![CDATA[F]]></cell></row>
<row id='271'><cell><![CDATA[17]]></cell><cell><![CDATA[Sanderlin]]></cell><cell><![CDATA[Taylor]]></cell><cell><![CDATA[F]]></cell></row>
<row id='280'><cell><![CDATA[18]]></cell><cell><![CDATA[Steedley]]></cell><cell><![CDATA[Sage]]></cell><cell><![CDATA[F]]></cell></row>
<row id='281'><cell><![CDATA[19]]></cell><cell><![CDATA[Taylor]]></cell><cell><![CDATA[Cami]]></cell><cell><![CDATA[F]]></cell></row>
<row id='258'><cell><![CDATA[20]]></cell><cell><![CDATA[Thigpen]]></cell><cell><![CDATA[Coston]]></cell><cell><![CDATA[M]]></cell></row>
<row id='260'><cell><![CDATA[21]]></cell><cell><![CDATA[Thornton]]></cell><cell><![CDATA[Beth-Anne]]></cell><cell><![CDATA[F]]></cell></row>
<row id='261'><cell><![CDATA[22]]></cell><cell><![CDATA[Thornton]]></cell><cell><![CDATA[Emily]]></cell><cell><![CDATA[F]]></cell></row>
<row id='263'><cell><![CDATA[23]]></cell><cell><![CDATA[Wilson]]></cell><cell><![CDATA[Jack]]></cell><cell><![CDATA[M]]></cell></row>
</rows>

The provided code does not causing the recursion for me.
Could you please, provide with a complete demo, where the problem can be reproduced locally.
Here you can find a tutorial about creating a complete demo:
docs.dhtmlx.com/auxiliary_docs__ … pport.html

I have tried to isolate the error in sample code and I have to keep adding more and more components, so is there a way I can create a login for you to have access to the working program and give you instructions on how to navigate to see the error?

I have a grid for posting payments that is giving me the error. I MUST attach the grid to the lay out to interact with the form for editing, so I need this fixed. I created the php page to load everything using the attachURL and it works great, but again, if I attach it to a layout cell, it gives me the max call error when I load the data.

Let me know where to email the login information and instructions, please.

  • BP

Same issue, migrate from previous version to new 4.1.3

Unfortunately the issue cannot be reproduced locally.
If the problem still occurs for you please, provide with a complete demo or a demo link, where it can be reconstructed.
Here you can find a tutorial about creating a complete demo:
docs.dhtmlx.com/tutorials__auxil … pport.html

What i noticed. it produces when there is a circular reference.
For example.
Same id in parent and child rows.

Unfortuanetly this is not a supporting case.
Each row in the grid should have a unique id, otherwise, plenty of various errors may occur.