Using Connector with xml

I have 4 combo’s on in a form with there own connector. 3 of them work but one of them keeps displaying an alert box with the xml.

I am using dhtmlx suite 3.6 pro. All the other php combo is written in a similar way and they all work. :astonished:

xml code

<?xml version="1.0"?>
	<item type="settings" labelWidth="150"  inputWidth="250"  position="absolute"  /> 
	<item type="input" name="FIRSTNAME"  bind="FIRSTNAME" label="Firstname:"  labelAlign="right"  inputWidth="200"  labelLeft="25"  labelTop="5"  inputLeft="200"  inputTop="5"  required="true" validate="NotEmpty"/> 
	<item type="input" name="LASTNAME"  bind="LASTNAME" label="Lastname:"  labelAlign="right"  inputWidth="200"  labelLeft="25"  labelTop="27"  inputLeft="200"  inputTop="25"  required="true" validate="NotEmpty"  /> 
	<item type="combo" name="CONTRACT"  bind="CONTRACT" label="Contract / Project:"  labelAlign="right"  inputWidth="225"  labelLeft="25"  labelTop="50"  inputLeft="200"  inputTop="50" connector="combo/staff/contract.php"  required="true" validate="NotEmpty" /> 
	<item type="combo" name="JOBTITLE"  bind="JOBTITLE" label="Job Title:"  labelAlign="right"  inputWidth="225"  labelLeft="25"  labelTop="75"  inputLeft="200"  inputTop="75"  connector="combo/staff/jobtitle.php"   /> 
	<item type="combo" name="ENGINEER"  bind="ENGINEER" label="Engineer Licence:"  labelAlign="right"  inputWidth="225"  labelLeft="25"  labelTop="100"  inputLeft="200"  inputTop="100"  connector="combo/staff/engineer.php"   required="true" validate="NotEmpty" /> 
	<item type="combo" name="PAYE"  bind="PAYE" label="PAYE or Contract:"  labelAlign="right"  inputWidth="225"  labelLeft="25"  labelTop="125"  inputLeft="200"  inputTop="125" connector="combo/staff/paye.php"   required="true" validate="NotEmpty" /> 
	<item type="input" name="EXT"  bind="EXT" label="Ofiice Phone Ext:"  labelAlign="right"  inputWidth="225"  labelLeft="25"  labelTop="150"  inputLeft="200"  inputTop="150" /> 
	<item type="input" name="MOBILE"  bind="MOBILE" label="Mobile Phone:"  labelAlign="right"  inputWidth="225"  labelLeft="25"  labelTop="175"  inputLeft="200"  inputTop="175"  /> 	
	<item type="input" name="AREA"  bind="AREA" label="Area:"  labelAlign="right"  inputWidth="225"  labelLeft="25"  labelTop="200"  inputLeft="200"  inputTop="200"  /> 
	<item type="input" name="EMAIL"  bind="EMAIL" label="E-mail Address:"  labelAlign="right"  inputWidth="225"  labelLeft="25"  labelTop="225"  inputLeft="200"  inputTop="225" validate="ValidEmail" required="true" /> 
	<item type="hidden" name="STATUS"  bind="STATUS" value="E"  /> 	
	<item type="button" xcommand="save"  value="Submit"  width="125"  inputWidth="125"  inputLeft="75"  inputTop="250"  /> 

php code:

$sql = "SELECT JOBTITLE from tblEmployees group by JOBTITLE";
$data = new ComboConnector($res, "MySQL");

Can anybody answer why I get this alert on this combo box or is it a bug in the latest release ?

Is it because to many options ?

All the other combo’s do not have as much data but uses the same table just different columns.

It can occurs if the client side code can’t parse the server side output.
Such problem can be caused by non utf text records for the combo ( by default all components expect utf data ), can be configured

Also, such error can occur if you have non xml output before the xml data, or invalid xml syntax - but it is more common for custom server side code, and must not occur in case of connector usage.

I can confirm that the Collation for the column is utf8_general_ci.

The client code is just the connector called within the form xml.

There is no custom code in the PHP.

What else can cause this issue ?

I have looked also in the javascript console and no error is generated.

The is no error in the SQL log.

And the alert that you function generated does not include an error message.


please provide completed demo or direct link to reproduce issue
you also can send it to

a) try to enable logging in the connector … de_logging

b) open js console, check the url in “network” panel which is used for problematic combo loaidng, and try to load it in the new window. If xml has syntax or encoding issues - browser will show details.

Thanks to all that replied.

While looking at the data the culprit was ‘&’ ampersand in the option value part of the XML.