debugConnector shows parameters null

I am using keyGridConnector for my grid and it loads from my db but can’t seem to get it to update, the log shows server parameters are null and xml is empty. How can I figure out whats wrong? Is this a DP issue? Also my dp.js is before connector.js in case you think that’s the issue.

My Connector

<?php 

include 'dhtmlxSuite/dhtmlxConnector/php/codebase/keygrid_connector.php';

$conn = mysql_connect("localhost", "root", "root");

if (!$conn) {
   die('Could not connect: ' . mysql_error());
}
$test = mysql_select_db("loxx", $conn);
if(!$test)
	throw new Exception('Table not found.');

$grid = new KeyGridConnector($conn);	
$grid->render_table("clients","name", "name,address,town,phone,email");
$grid->set_encoding("utf-8");
$grid->enable_log("log.txt", true);
 
?>

My script

$( '#admin_page' ).live( 'pageinit',function(event){
  		
  		$('#clients').live('click', function(){
   	 		mygrid = new dhtmlXGridObject('gridbox');
			mygrid.setImagePath("dhtmlxSuite/dhtmlxGrid/codebase/imgs/");
			mygrid.setHeader("Name, Address, Town, Phone,Email");
			mygrid.setInitWidths("100,250,100,100,100");
			mygrid.setColAlign("right,left, center,center,center");
			mygrid.setColTypes("ed,ed,ed,ed,ed");
			mygrid.setColSorting("str,str,str,str,str");
			mygrid.setSkin("light");
			mygrid.init();
			mygrid.load('db_connector.php'); //load data
  			var dp = new dataProcessor('db_connector.php');
  			dp.setTransactionMode("POST");
			dp.init(mygrid);
			
   			 });

			


a) check that you have both dhtmlxdataprocessor.js and connector.js included on the page.
b) be sure that you are using components and dhtmlxdataprocessor from the same version. If you are using latest dataprocessor with dhtmlx 2.5, or latest component with dataprocessor 2.5 - it may result in such problem. To be sure - use dhtmlxdataprocessor.js which is included in dhtmlxSuite package.

Yes I have check and I am doing all of that but still can’t find he issue.

These are my includes

<link rel="stylesheet" type="text/css" href="dhtmlxSuite/dhtmlxGrid/codebase/dhtmlxgrid.css"/>
<link rel="stylesheet" type="text/css" href="dhtmlxSuite/dhtmlxGrid/codebase/dhtmlxgrid_skins.css">
<script src="dhtmlxSuite/dhtmlxGrid/codebase/dhtmlxcommon.js"></script>
<script src="dhtmlxSuite/dhtmlxGrid/codebase/dhtmlxgrid.js"></script>
<script src="dhtmlxSuite/dhtmlxGrid/codebase/dhtmlxgridcell.js"></script>
<script src="dhtmlxSuite/dhtmlxDataProcessor/codebase/dhtmlxdataprocessor.js"></script>
	
<script src="dhtmlxSuite/dhtmlxConnector/php/codebase/connector.js" type="text/javascript"></script>
<script src="dhtmlxSuite/dhtmlxDataProcessor/codebase/dhtmlxdataprocessor_debug.js" type="text/javascript"></script> 
<script type="text/javascript"  src="myGrid.js" type="text/javascript"></script>

Anything else I should try? :confused:

Please try to

  • remove dhtmlxdataprocessor_debug.js
  • replace dataprocessor and connector with attached ones.

You are using grid 3.0+ , right ?
codebase.zip (8.74 KB)

I am using the latest suite package 3.5 and the latest php connector 1.5.
I am using keyGridConnector and my table looks like this
(name, address, town, phone, email,username, password)

The debugger is working now though this is the output on update of a cell:

Current state
ID:Mary Kay Status: updated, valid
Current mode: cell
Log:
row Mary Kay marked [updated,valid]
Initiating data sending for Mary Kay
Initiating data sending for all rows
Sending all data at once
Server url: db_connector.php?editing=true parameters
Mary Kay
gr_id = Mary Kay
c0 = Mary Kay
c1 = this is updated info
c2 = Lancaster
c3 = 837-044-4409
c4 = jsli@hfg.com
c5 = 123fun
c6 = gippy
!nativeeditor_status = updated

Server response received details

<?xml version='1.0' ?>

Your help is greatly appreciated…

Such kind of response can occur if server side doesn’t recognize data-update call.
It can be caused

a) incorrect order of includes - be sure that connector.js included after dataprocessor.js
b) usage of setUpdateMode of dataprocessor, it is set by default to “POST, all data at once” and if mode will be changed manually server side code will not recognize incoming request.

I am getting this back from the server but I am not sure how to fix it. I have removed code for manual setup of post data. What would cause this exception?

====================================
Log started, 15/08/2012 10:08:12

DataProcessor object initialized

!!!Uncaught Exception
Code: 0
Message: Incorrect incoming data, ID of incoming records not recognized

This is my log file:

====================================
Log started, 15/08/2012 10:08:49

DataProcessor object initialized
Mary_Kay_gr_id => Mary Kay
Mary_Kay_c0 => Mary Kay
Mary_Kay_c1 => dsfdsfsdf
Mary_Kay_c2 => Lancaster
Mary_Kay_c3 => 837-044-4409
Mary_Kay_c4 => jsli@hfg.com
Mary_Kay_c5 => 123fun
Mary_Kay_c6 => gippy
Mary_Kay_!nativeeditor_status => updated
ids => Mary Kay

Row data [Mary Kay]

exception ‘Exception’ with message ‘Status of record [Mary Kay] not found in incoming request’ in /Users/Zebra/Sites/comps/dhtmlxSuite/dhtmlxConnector/php/codebase/dataprocessor.php:77
Stack trace:
#0 /Users/Zebra/Sites/comps/dhtmlxSuite/dhtmlxConnector/php/codebase/dataprocessor.php(98): DataProcessor->get_operation(‘Mary Kay’)
#1 /Users/Zebra/Sites/comps/dhtmlxSuite/dhtmlxConnector/php/codebase/base_connector.php(475): DataProcessor->process(Object(DataConfig), Object(DataRequestConfig))
#2 /Users/Zebra/Sites/comps/dhtmlxSuite/dhtmlxConnector/php/codebase/base_connector.php(398): Connector->render()
#3 /Users/Zebra/Sites/comps/db_connector.php(21): Connector->render_table(‘clients’, ‘name’, ‘name,address,to…’)
#4 {main}

Edit operation finished

Done in 0.0558390617371s

This one is limitation of connectors
You are using “_” in the record ID, and this is the only char in the id string which can break server side parameters parsing.

Fixed version of connector will be availalble in few days.

Hi,

Is there a new fixed version yet?

I really need this to work for my project.

:unamused:

This is not a final fix, but will resolve issue - update dataprocessor.php in connectors folder and dataprocessor.js from attached package.
dataprocessor.zip (8.55 KB)