DataProcessor "save" not working in IE7 but works in Firefox

DataProcessor “sendData()” is not working in IE7 but works in Firefox, although the url and the parameters are exactly the same on IE7 as in Firefox (I am using dataprocessor debugger to see request details):

Initiating data sending for all rows 
 Sending all data at once
 Server url: griddata?table=mode_type parameters
3_gr_id=3
3_c0=CAPI
3_c1=John%20Duck
3_c2=2010-11-11%2000%3A00%3A00.0
3_!nativeeditor_status=updated
ids=3

But the response I got is different. On Firefox, it’s expected:

Action: updated SID:3 TID:3
row 3 unmarked [updated,valid]

But on IE7, the response is for a GET, not a POST:

[code]Server response received details

<?xml version='1.0' encoding='utf-8' ?>First NameLast NameEmail

[/code]

Any idea about what went wrong here? Thanks!

Be sure that

a) old js files are not cached in case of IE
b) dhtmlxconnector.js included on the page after dataprocessor.js

Normally there must not be any difference betweem FF and IE7 , but it can occur because of different cache or different script loading behaviors.

Hi, after I moved connector.js to be after dhtmlxdataprocessor.js, I got following message:

<?xml version='1.0' encoding='utf-8' ?><data>Operation error</data>

I also manually cleared IE’s cache, that didn’t help either.

<?xml version='1.0' encoding='utf-8' ?>Operation error

Now client side send some correct data and server side process it as some update operation
Probably there is some misconfiguration on server side, you can enable logs and check details
docs.dhtmlx.com/doku.php?id=dhtm … nd_logging

The server log message is:

Error during data processing
Incorrect incoming data, ID of incoming records not recognized

But the ID sent to the server is obviously correct - here are the sent data in IE:

2_gr_id=2
2_c0=YYY
2_c1=nnnMike
2_c2=2010-10-21%2000%3A00%3A00.0
2_!nativeeditor_status=updated
ids=2

It’s exactly the same as those sent in FF, but the response is different.

I’m out of ideas
Such error message is triggered by the next line in the connectors code
if (!isset($_POST[“ids”]))
so, it can occur only if ids parameter was not provided at all.

By any chance are you using connectors with https url ?

If issue still occurs for you - please provide any kind of sample or demo link where it can be reconstructed.

[]No. I am using everything on my own machine. No https.[/]
[]I am using java on the server side - I probably have to use logging in BaseConnector.java and DataProcessor.java to pinpoint the problem.[/]
[]It would be very difficult/impossible to provide a demo link. Let me see what I can do.[/]

In case of java connector - logic is the same

DataProcessor.java

public String process() ... String ids = connector.incoming_data.get("ids"); if (ids==null) throw new ConnectorOperationException("Incorrect incoming data, ID of incoming records not recognized");

Yes, I saw that in the java code. I suspect that the dataprocessor debugger is not faithfully recording what is being sent to the server - because obviously, server side code works, for both Firefox and the version of IE7 I use at home. It’s just the version of IE7 my company uses is sending data differently, so the server is receiving different data.

The exact version number of IE7 my company uses is: 7.0.5730.13CO. I searched online and found it’s not a regular version of IE7:
activewidgets.com/javascript … -13co.html

It would be great if you can take a look and let me know your thoughts (please especially pay attention to the part on the ‘CO’ and ‘IEAK’).

I used log manager in BaseConnector to find the problem: in IE7, the server is not receiving the data in the same format as sent from FF. In IE7 (again the version with ‘CO’ at the end), the log is incomplete:

====================================
Log started, Mon Dec 06 17:07:22 CST 2010
====================================
Key --- project; Value --- 6663
Key --- username; Value --- John-Doe
Key --- editing; Value --- true
Key --- domain; Value --- VIKING 
Key --- table; Value --- basic_project_info_input
Error during data processing
Incorrect incoming data, ID of incoming records not recognized
Done in : 31ms

But in FF, the log is much longer and of course complete:

====================================
Log started, Mon Dec 06 17:03:59 CST 2010
====================================
Key --- 1_gr_id; Value --- 1
Key --- 1_c2; Value --- 1
Key --- 1_c1; Value --- 6663
Key --- 1_c4; Value --- Region 1
Key --- username; Value --- John-Doe
Key --- 1_c3; Value --- 1
Key --- 1_c0; Value --- 1
Key --- 1_c20; Value --- 2010-11-24 00:00:00.0
Key --- domain; Value --- VIKING
Key --- editing; Value --- true
Key --- ids; Value --- 1
Key --- table; Value --- basic_project_info_input
Key --- 1_c6; Value --- Y
Key --- 1_c5; Value --- 1
Key --- project; Value --- 6663
Key --- 1_c8; Value --- 2011-03-07 00:00:00.0
Key --- 1_c7; Value --- 2010-12-02 00:00:00.0
Key --- 1_c13; Value --- 90.00000000
Key --- 1_c12; Value --- 300000
Key --- 1_c9; Value --- 250.00
Key --- 1_c11; Value --- 762.00
Key --- 1_c10; Value --- 50.00
Key --- 1_c17; Value --- System
Key --- 1_c16; Value --- ACTIVE
Key --- 1_c15; Value --- 1
Key --- 1_c14; Value --- 762000.00
Key --- 1_!nativeeditor_status; Value --- updated
Key --- 1_c19; Value --- 1
Key --- 1_c18; Value --- 2010-11-18
DB query 
UPDATE basic_project_info_input SET basic_project_info_id='1',project_id='6663',project_case_region_key='1',project_case_region_id='1',project_case_region='Region 1',project_info_version='1',current_project_info_flag='Y',data_collect_begin_week='2010-12-02 00:00:00.0',data_collect_end_week='2011-03-07 00:00:00.0',budget_hours_per_case='250.00',budget_expense_per_case='50.00',budget_loaded_cost_per_case='762.00',budget_total_cases='300000',budget_completion_percent='90.00000000',budget_total_loaded_cost='762000.00',version_nbr='1',record_status='ACTIVE',entered_by='System',entered_on_date='2010-11-18',etl_status='1',etl_process_timestamp='2010-11-24 00:00:00.0' WHERE basic_project_info_id='1' 

Done in : 47ms

I also captured the info sent from IE7 with DebugBar - it doesn’t look like normal form submission - the separator is “
,” not the “&”. But when I capture it in either Fiddler2 or Firebug Lite, it appears to be “&”:

DataProcessor :: row 1 marked [updated,valid]DataProcessor :: Initiating data sending for all rows DataProcessor :: Sending all data at onceDataProcessor :: Server url: griddata?table=basic_project_info_input&project=6663&domain=VIKING&username=John-Doe&editing=true <a onclick='this.parentNode.nextSibling.firstChild.style.display="block"' href='#'>parameters</a>DataProcessor :: <blockquote style='display:none;'>1_gr_id=1<br/>1_c0=1<br/>1_c1=6663<br/>1_c2=1<br/>1_c3=1<br/>1_c4=Region%201<br/>1_c5=1<br/>1_c6=Y<br/>1_c7=2010-12-02%2000%3A00%3A00.0<br/>1_c8=2011-03-07%2000%3A00%3A00.0<br/>1_c9=250.00<br/>1_c10=50.00<br/>1_c11=762.00<br/>1_c12=300000<br/>1_c13=90.00000000<br/>1_c14=762000.00<br/>1_c15=1<br/>1_c16=ACTIVE<br/>1_c17=System<br/>1_c18=2010-11-20<br/>1_c19=1<br/>1_c20=2010-11-24%2000%3A00%3A00.0<br/>1_!nativeeditor_status=updated<br/>ids=1<blockquote>DataProcessor :: Server response received <a onclick='this.nextSibling.style.display="block"' href='#'>details</a><blockquote style='display:none'><code>&lt;?xml version='1.0' encoding='utf-8' ?&gt;&lt;data&gt;Operation error&lt;/data&gt;</code></blockquote>

It’s an urgent matter - I wonder if you can either make the dataprocessor more generic (such as creating a regular form - not sure if that’s what you have already done), or make the server end more robust so it can read different formats of data. Thanks!

This is something interesting I found: if I run the application with Fiddler2 open, even IE7.0.5730.13CO works! But it still doesn’t always work. Very tricky.

You can always revert to more simple way of data saving.
Instead of

form.save()

you can use

form.send(“some”);

and as result form data will be send to the server side, by ajax, but similar to normal html form ( will not have any parameter encoding, and will not await any response from server side )

Sorry I have edited the subject to be more accurate: but I am using dataProcessor.sendData(); I am not sure if you are suggesting me change both dataprocessor.js and server side code? Could you provide a patch for dataprocessor.js so it submits parameters in the most generic way or, maybe just put everything in the URL? Thanks.

You can change the way how dataprocessor sends data, but in such case the connector on server side will not work correctly. ( because it is adjusted to the existing format of dataprocessor’s data )

The strange thing - nearly the same code works correctly locally. And so far we have not any reports about difference of dataprocessor’s behavior in IE7 with relation to other browsers.

As we can’t reconstruct issue - it is hard to suggest any solution.

As I have noted: IE7 with version ending in ‘CO’ is customized by corporate administrators; so I guess that’s why it’s causing problems. I saw in your sever code it’s just a simple http_request.getParameters(), so could you change dataprocessor.js to send plain form or put everything in URL (which I am sure will work)? I looked at the javascript code - but it’s very difficult/impossible for me to read.

so could you change dataprocessor.js to send plain form or put everything in URL
on client side you can add the next line

dp.setTransactionMode(“GET”, true);

as result client side code will use GET instead of POST

Hey, that’s simple enough! And it worked! I guess we just need to think harder. Thanks!